From 0897eab59fb14f0ed4f1c0b781f120629a9b833e Mon Sep 17 00:00:00 2001 From: Barbapapazes Date: Tue, 18 Apr 2023 10:20:07 +0200 Subject: [PATCH 1/3] feat: support rel in footer --- .../content/1.introduction/4.configuration.md | 116 +++++++++--------- components/app/AppFooter.vue | 1 + 2 files changed, 60 insertions(+), 57 deletions(-) diff --git a/.docs/content/1.introduction/4.configuration.md b/.docs/content/1.introduction/4.configuration.md index 8ea9b0c17..c793acefa 100644 --- a/.docs/content/1.introduction/4.configuration.md +++ b/.docs/content/1.introduction/4.configuration.md @@ -50,7 +50,8 @@ export default defineAppConfig({ { text: 'NuxtJS', href: 'https://nuxtjs.org', - target: '_blank' + target: '_blank', + rel: 'noopener' } ], iconLinks: [ @@ -72,59 +73,60 @@ export default defineAppConfig({ :: -| **Key** | **Type** | **Default** | **Description** | -| ---------------------------- | ---------- | ---------------- | ------------------------------------------------------------------- | -| `title` | `string` | Docus | Website title | -| `titleTemplate` | `string` | Docus | Website title template | -| `description` | `string` | My Docus Project | Website description | -| `url` | `string` | | Website URL | -| `layout` | `string` | default | Fallback layout to use (supports `default` or `page`) | -| **Socials** | | | | -| `socials` | `object` | `{}` | Social links | -| `socials.github` | `string` | | The repository to use on GitHub links | -| `socials.twitter` | `string` | | The account to use on Twitter links | -| `socials.youtube` | `string` | | The channel to use on Youtube links | -| `socials.instagram` | `string` | | The account to use on Instagram links | -| `socials.facebook` | `string` | | The account to use on Facebook links | -| `socials.medium` | `string` | | The account to use on Medium links | -| `socials.[social]` | `object` | | Override social or display custom one | -| `socials.[social].label` | `string` | | A label to use for the social | -| `socials.[social].icon` | `string` | | A icon to use for the social | -| `socials.[social].href` | `string` | | A link to use for the social | -| **Header** | | | | -| `header` | `object` | | Header configuration | -| `header.logo` | `boolean` | | Whether or not to use `Logo.vue` as the header logo | -| `header.title` | `string` | | If set to a string, will be used in the header | -| `header.showLinkIcon` | `boolean` | | If set to `true` links icons will show in the header | -| `header.exclude` | `string[]` | | An array of path to exclude out from the header navigation | -| `header.fluid` | `boolean` | `true` | Make header `Container` fluid | -| **Main** | | | | -| `main` | `object` | | Main configuration | -| `main.fluid` | `boolean` | `true` | Make main content `Container` fluid | -| `main.padded` | `boolean` | `true` | Make main content `Container` padded | -| **Aside** | | | | -| `aside` | `object` | | Aside configuration | -| `aside.level` | `string` | 0 | Aside base level of nesting | -| `aside.collapsed` | `boolean` | | Will be used as default value for collapsible navigation categories | -| `aside.exclude` | `string[]` | | An array of path to exclude out from the aside navigation | -| **Footer** | | | | -| `footer` | `object` | | Footer configuration | -| `footer.credits` | `object` | | An object defining the bottom left credits | -| `footer.credits.icon` | `object` | | The icon to use for the credits | -| `footer.credits.text` | `object` | | The text to use for the credits | -| `footer.textLinks` | `array` | `[]` | An array of texts to display at the center of footer | -| `footer.textLinks[0].text` | `string` | | The text to display | -| `footer.textLinks[0].href` | `string` | | A link to use for the text | -| `footer.textLinks[0].target` | `string` | `_self` | Where to display the linked URL, as the name for a browsing context | -| `footer.iconLinks` | `array` | `[]` | An array of icons to display in the footer | -| `footer.iconLinks[0].label` | `string` | | A label to use for the icon | -| `footer.iconLinks[0].href` | `string` | | A link to use for the icon | -| `footer.iconLinks[0].icon` | `string` | | The icon to use (can be a component name) | -| `footer.fluid` | `boolean` | `true` | Make footer `Container` fluid | -| **GitHub** | | | | -| `github` | `object` | `false` | GitHub integration configuration | -| `github.dir` | `string` | | Directory containing the files to be edited | -| `github.branch` | `string` | | Branch to start editing | -| `github.repo` | `string` | | Name of the GitHub repo to edit files | -| `github.owner` | `string` | | Owner of the repo | -| `github.edit` | `boolean` | | Toggle "Edit this page on Github" component on documentation pages | +| **Key** | **Type** | **Default** | **Description** | +| ---------------------------- | ---------- | ---------------- | ---------------------------------------------------------------------------------------------------- | +| `title` | `string` | Docus | Website title | +| `titleTemplate` | `string` | Docus | Website title template | +| `description` | `string` | My Docus Project | Website description | +| `url` | `string` | | Website URL | +| `layout` | `string` | default | Fallback layout to use (supports `default` or `page`) | +| **Socials** | | | | +| `socials` | `object` | `{}` | Social links | +| `socials.github` | `string` | | The repository to use on GitHub links | +| `socials.twitter` | `string` | | The account to use on Twitter links | +| `socials.youtube` | `string` | | The channel to use on Youtube links | +| `socials.instagram` | `string` | | The account to use on Instagram links | +| `socials.facebook` | `string` | | The account to use on Facebook links | +| `socials.medium` | `string` | | The account to use on Medium links | +| `socials.[social]` | `object` | | Override social or display custom one | +| `socials.[social].label` | `string` | | A label to use for the social | +| `socials.[social].icon` | `string` | | A icon to use for the social | +| `socials.[social].href` | `string` | | A link to use for the social | +| **Header** | | | | +| `header` | `object` | | Header configuration | +| `header.logo` | `boolean` | | Whether or not to use `Logo.vue` as the header logo | +| `header.title` | `string` | | If set to a string, will be used in the header | +| `header.showLinkIcon` | `boolean` | | If set to `true` links icons will show in the header | +| `header.exclude` | `string[]` | | An array of path to exclude out from the header navigation | +| `header.fluid` | `boolean` | `true` | Make header `Container` fluid | +| **Main** | | | | +| `main` | `object` | | Main configuration | +| `main.fluid` | `boolean` | `true` | Make main content `Container` fluid | +| `main.padded` | `boolean` | `true` | Make main content `Container` padded | +| **Aside** | | | | +| `aside` | `object` | | Aside configuration | +| `aside.level` | `string` | 0 | Aside base level of nesting | +| `aside.collapsed` | `boolean` | | Will be used as default value for collapsible navigation categories | +| `aside.exclude` | `string[]` | | An array of path to exclude out from the aside navigation | +| **Footer** | | | | +| `footer` | `object` | | Footer configuration | +| `footer.credits` | `object` | | An object defining the bottom left credits | +| `footer.credits.icon` | `object` | | The icon to use for the credits | +| `footer.credits.text` | `object` | | The text to use for the credits | +| `footer.textLinks` | `array` | `[]` | An array of texts to display at the center of footer | +| `footer.textLinks[0].text` | `string` | | The text to display | +| `footer.textLinks[0].href` | `string` | | A link to use for the text | +| `footer.textLinks[0].target` | `string` | `_self` | Where to display the linked URL, as the name for a browsing context | +| `footer.textLinks[0].rel` | `string` | | A space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types) | +| `footer.iconLinks` | `array` | `[]` | An array of icons to display in the footer | +| `footer.iconLinks[0].label` | `string` | | A label to use for the icon | +| `footer.iconLinks[0].href` | `string` | | A link to use for the icon | +| `footer.iconLinks[0].icon` | `string` | | The icon to use (can be a component name) | +| `footer.fluid` | `boolean` | `true` | Make footer `Container` fluid | +| **GitHub** | | | | +| `github` | `object` | `false` | GitHub integration configuration | +| `github.dir` | `string` | | Directory containing the files to be edited | +| `github.branch` | `string` | | Branch to start editing | +| `github.repo` | `string` | | Name of the GitHub repo to edit files | +| `github.owner` | `string` | | Owner of the repo | +| `github.edit` | `boolean` | | Toggle "Edit this page on Github" component on documentation pages | diff --git a/components/app/AppFooter.vue b/components/app/AppFooter.vue index 84266ebc6..3cd0ca717 100644 --- a/components/app/AppFooter.vue +++ b/components/app/AppFooter.vue @@ -27,6 +27,7 @@ const nbSocialIcons = computed(() => (socialIcons.value ? socialIconsCount.value :aria-label="link.text" :href="link.href" :target="link.target || '_self'" + :rel="link.rel" > {{ link.text }} From 387cb7d1dd46164a9ac102321869e51f7291ccf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 25 Apr 2023 14:25:52 +0200 Subject: [PATCH 2/3] Update .docs/content/1.introduction/4.configuration.md --- .docs/content/1.introduction/4.configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docs/content/1.introduction/4.configuration.md b/.docs/content/1.introduction/4.configuration.md index c793acefa..25c15a918 100644 --- a/.docs/content/1.introduction/4.configuration.md +++ b/.docs/content/1.introduction/4.configuration.md @@ -48,7 +48,7 @@ export default defineAppConfig({ }, textLinks: [ { - text: 'NuxtJS', + text: 'Nuxt', href: 'https://nuxtjs.org', target: '_blank', rel: 'noopener' From 6ce0eacbce04abdaf23d356af4ad90bec54061f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 25 Apr 2023 14:25:57 +0200 Subject: [PATCH 3/3] Update .docs/content/1.introduction/4.configuration.md --- .docs/content/1.introduction/4.configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docs/content/1.introduction/4.configuration.md b/.docs/content/1.introduction/4.configuration.md index 25c15a918..9cd3805d2 100644 --- a/.docs/content/1.introduction/4.configuration.md +++ b/.docs/content/1.introduction/4.configuration.md @@ -49,7 +49,7 @@ export default defineAppConfig({ textLinks: [ { text: 'Nuxt', - href: 'https://nuxtjs.org', + href: 'https://nuxt.com', target: '_blank', rel: 'noopener' }