diff --git a/app.config.ts b/app.config.ts index b5f4e06e4..aebf26861 100644 --- a/app.config.ts +++ b/app.config.ts @@ -17,8 +17,10 @@ import tree from "./.solid/tree"; import entries from "./.solid/flat-entries"; import solidstartEntries from "./.solid/solid-start-flat-entries"; import solidrouterEntries from "./.solid/solid-router-flat-entries"; +import solidMetaEntries from "./.solid/solid-meta-flat-entries"; import solidrouterTree from "./.solid/solid-router-tree"; import solidStartTree from "./.solid/solid-start-tree"; +import solidMetaTree from "./.solid/solid-meta-tree"; function docsData() { const virtualModuleId = "solid:collection"; @@ -37,9 +39,11 @@ function docsData() { export const coreEntries = ${JSON.stringify(entries, null, 2)} export const routerEntries = ${JSON.stringify(solidrouterEntries, null, 2)} export const startEntries = ${JSON.stringify(solidstartEntries, null, 2)} + export const metaEntries = ${JSON.stringify(solidMetaEntries, null, 2)} export const coreTree = ${JSON.stringify(tree, null, 2)} export const routerTree = ${JSON.stringify(solidrouterTree, null, 2)} export const startTree = ${JSON.stringify(solidStartTree, null, 2)} + export const metaTree = ${JSON.stringify(solidMetaTree, null, 2)} `; } }, @@ -54,7 +58,7 @@ export default defineConfig({ crawlLinks: true, autoSubfolderIndex: false, failOnError: true, - ignore: [/\{\getPath}/], + ignore: [/\{\getPath}/, /.*?emojiSvg\(.*/], }, }, extensions: ["mdx", "md", "tsx"], diff --git a/global.d.ts b/global.d.ts index 1530e577e..fd182f46a 100644 --- a/global.d.ts +++ b/global.d.ts @@ -2,16 +2,20 @@ declare module "solid:collection" { import coreTree from ".solid/tree"; import startTree from ".solid/solid-router-tree"; import routerTree from ".solid/solid-start-tree"; + import metaTree from ".solid/solid-meta-tree"; import coreEntries from ".solid/flat-entries"; import routerEntries from ".solid/solid-start-flat-entries"; import startEntries from ".solid/solid-router-flat-entries"; + import metaEntries from ".solid/solid-meta-flat-entries"; export { coreEntries, routerEntries, startEntries, + metaEntries, coreTree, routerTree, startTree, + metaTree, }; } diff --git a/scripts/collections/index.mjs b/scripts/collections/index.mjs index ffc3f40c9..9edb96298 100644 --- a/scripts/collections/index.mjs +++ b/scripts/collections/index.mjs @@ -6,7 +6,7 @@ import { createI18nEntries } from "../create-i18n-entries.mjs"; import { createI18nTree } from "../create-i18n-tree.mjs"; export const languages = ["pt-br"]; -const projects = ["solid-router", "solid-start"]; +const projects = ["solid-router", "solid-start", "solid-meta"]; export const COLLECTIONS_ROOT = "src/routes"; (async () => { diff --git a/src/routes/solid-meta/data.json b/src/routes/solid-meta/data.json new file mode 100644 index 000000000..c1b741048 --- /dev/null +++ b/src/routes/solid-meta/data.json @@ -0,0 +1,4 @@ +{ + "title": "root", + "pages": ["index.mdx", "getting-started"] +} diff --git a/src/routes/solid-meta/getting-started/client-setup.mdx b/src/routes/solid-meta/getting-started/client-setup.mdx new file mode 100644 index 000000000..32bc50c83 --- /dev/null +++ b/src/routes/solid-meta/getting-started/client-setup.mdx @@ -0,0 +1,22 @@ +--- +title: Client setup +order: 2 +--- + +You can inject a tag into the `
+` by rendering one of the head tag components when necessary.
+No special requirements are needed on the client side.
+
+```js
+import { MetaProvider, Title, Link, Meta } from "@solidjs/meta";
+
+const App = () => (
+
`](/solid-meta/reference/meta/title): Adds the `title` of the page.
+ 2. [``](/solid-meta/reference/meta/meta): Adds extra metadata to the page.
+ 3. [``](/solid-meta/reference/meta/style): Adds a `style` element to the page.
+ 4. [``](/solid-meta/reference/meta/link): Specifies a relationship between the page and an external resource.
+ 5. [`
+ ${getAssets()} + +