@astrojs/starlight 0.36.0 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @astrojs/starlight
2
2
 
3
+ ## 0.36.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3479](https://github.com/withastro/starlight/pull/3479) [`2fec483`](https://github.com/withastro/starlight/commit/2fec4833d4867db35b77079ce3026b79ba1e0441) Thanks [@gboubeta-uvigo](https://github.com/gboubeta-uvigo)! - Updates Galician UI translations
8
+
9
+ - [#3457](https://github.com/withastro/starlight/pull/3457) [`c6c0c51`](https://github.com/withastro/starlight/commit/c6c0c5114a659b22ffcc4c2085ad8c1fc4f43a5d) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Deduplicates sitemap link tags in the head.
10
+
11
+ When [enabling sitemap](https://starlight.astro.build/guides/customization/#enable-sitemap) in Starlight, a `<link rel="sitemap" href="/sitemap-index.xml">` tag is automatically added to the head of each page. Manually specifying sitemap link tags using the Starlight [`head` configuration option](https://starlight.astro.build/reference/configuration/#head) or the [`head` frontmatter field](https://starlight.astro.build/reference/frontmatter/#head) will now override the default sitemap link tag added by Starlight.
12
+
13
+ This change ensures that users manually adding the `@astrojs/sitemap` integration to the Astro `integrations` array for more fine-grained control over sitemap generation and also using the [`filenameBase` integration option](https://docs.astro.build/en/guides/integrations-guide/sitemap/#filenamebase) can customize the sitemap link tag in the head.
14
+
15
+ - [#3448](https://github.com/withastro/starlight/pull/3448) [`1fc7501`](https://github.com/withastro/starlight/commit/1fc7501d16218c7f156c5e90df25ae6fbb8abfea) Thanks [@dionysuzx](https://github.com/dionysuzx)! - Enlarges the Farcaster icon to better match other social icons
16
+
17
+ - [#3473](https://github.com/withastro/starlight/pull/3473) [`07204dd`](https://github.com/withastro/starlight/commit/07204dd7b8b6ee71bf24ff9c7d70fc7306bf2076) Thanks [@gboubeta](https://github.com/gboubeta)! - Fixes a typo in Galician table of contents label
18
+
3
19
  ## 0.36.0
4
20
 
5
21
  ### Minor Changes
@@ -81,7 +81,7 @@ export const BuiltInIcons = {
81
81
  codePen:
82
82
  '<path d="M23.5 7.5 12.5.2a1 1 0 0 0-1 0L.4 7.5a1 1 0 0 0-.5.8v7.4c0 .3.2.6.5.8l11 7.3c.3.3.7.3 1 0l11-7.3c.3-.2.5-.5.5-.8V8.3a1 1 0 0 0-.5-.8zM13 3l8.1 5.3-3.6 2.5-4.5-3V3zm-2 0v4.8l-4.5 3-3.6-2.5 8-5.3zm-9 7.3L4.7 12l-2.5 1.7v-3.4zM11 21l-8.1-5.3 3.6-2.5 4.5 3V21zm1-6.6L8.4 12 12 9.6l3.6 2.4-3.6 2.4zm1 6.6v-4.8l4.5-3 3.6 2.5-8 5.3zm9-7.3L19.3 12l2.5-1.7v3.4z"/>',
83
83
  farcaster:
84
- '<path d="M6.187 3.733h11.627v16.533h-1.707v-7.573h-.017a4.107 4.107 0 0 0-8.18 0h-.017v7.573H6.186z"/><path d="m3.093 6.08.693 2.347h.587v9.493a.533.533 0 0 0-.533.533v.64h-.107a.533.533 0 0 0-.533.533v.64h5.973v-.64a.533.533 0 0 0-.533-.533h-.107v-.64A.533.533 0 0 0 8 17.92h-.64V6.08zM16.213 17.92a.533.533 0 0 0-.533.533v.64h-.107a.533.533 0 0 0-.533.533v.64h5.973v-.64a.533.533 0 0 0-.533-.533h-.107v-.64a.533.533 0 0 0-.533-.533V8.427h.587l.693-2.347h-4.267v11.84z"/>',
84
+ '<path d="M 4.572 1.25 h 14.59 v 20.746 h -2.142 v -9.503 h -0.021 a 5.154 5.154 0 0 0 -10.264 0 h -0.021 v 9.503 H 4.571 z"/><path d="m 0.69 4.195 0.87 2.945 h 0.737 v 11.912 a 0.669 0.669 0 0 0 -0.669 0.669 v 0.803 h -0.134 a 0.669 0.669 0 0 0 -0.669 0.669 v 0.803 h 7.495 v -0.803 a 0.669 0.669 0 0 0 -0.669 -0.669 h -0.134 v -0.803 A 0.669 0.669 0 0 0 6.847 19.052 h -0.803 V 4.195 z M 17.153 19.052 a 0.669 0.669 0 0 0 -0.669 0.669 v 0.803 h -0.134 a 0.669 0.669 0 0 0 -0.669 0.669 v 0.803 h 7.495 v -0.803 a 0.669 0.669 0 0 0 -0.669 -0.669 h -0.134 v -0.803 a 0.669 0.669 0 0 0 -0.669 -0.669 V 7.14 h 0.737 l 0.87 -2.945 h -5.354 v 14.857 z"/>',
85
85
  discord:
86
86
  '<path d="M20.32 4.37a19.8 19.8 0 0 0-4.93-1.51 13.78 13.78 0 0 0-.64 1.28 18.27 18.27 0 0 0-5.5 0 12.64 12.64 0 0 0-.64-1.28h-.05A19.74 19.74 0 0 0 3.64 4.4 20.26 20.26 0 0 0 .11 18.09l.02.02a19.9 19.9 0 0 0 6.04 3.03l.04-.02a14.24 14.24 0 0 0 1.23-2.03.08.08 0 0 0-.05-.07 13.1 13.1 0 0 1-1.9-.92.08.08 0 0 1 .02-.1 10.2 10.2 0 0 0 .41-.31h.04a14.2 14.2 0 0 0 12.1 0l.04.01a9.63 9.63 0 0 0 .4.32.08.08 0 0 1-.03.1 12.29 12.29 0 0 1-1.9.91.08.08 0 0 0-.02.1 15.97 15.97 0 0 0 1.27 2.01h.04a19.84 19.84 0 0 0 6.03-3.05v-.03a20.12 20.12 0 0 0-3.57-13.69ZM8.02 15.33c-1.18 0-2.16-1.08-2.16-2.42 0-1.33.96-2.42 2.16-2.42 1.21 0 2.18 1.1 2.16 2.42 0 1.34-.96 2.42-2.16 2.42Zm7.97 0c-1.18 0-2.15-1.08-2.15-2.42 0-1.33.95-2.42 2.15-2.42 1.22 0 2.18 1.1 2.16 2.42 0 1.34-.94 2.42-2.16 2.42Z"/>',
87
87
  gitter:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/starlight",
3
- "version": "0.36.0",
3
+ "version": "0.36.1",
4
4
  "description": "Build beautiful, high-performance documentation websites with Astro",
5
5
  "keywords": [
6
6
  "docs",
@@ -4,27 +4,40 @@
4
4
  "search.ctrlKey": "Ctrl",
5
5
  "search.cancelLabel": "Deixar",
6
6
  "search.devWarning": "A busca só está dispoñible nas versións de producción. \nTrata de construir e ollear o sitio para probalo localmente.",
7
- "themeSelect.accessibleLabel": "Seleciona tema",
7
+ "themeSelect.accessibleLabel": "Selecciona tema",
8
8
  "themeSelect.dark": "Escuro",
9
9
  "themeSelect.light": "Claro",
10
10
  "themeSelect.auto": "Auto",
11
11
  "languageSelect.accessibleLabel": "Seleciona linguaxe",
12
12
  "menuButton.accessibleLabel": "Menú",
13
13
  "sidebarNav.accessibleLabel": "Principal",
14
- "tableOfContents.onThisPage": "Nesta paxina",
14
+ "tableOfContents.onThisPage": "Nesta páxina",
15
15
  "tableOfContents.overview": "Sinopse",
16
16
  "i18n.untranslatedContent": "Este contido aínda non está dispoñible no teu idioma.",
17
- "page.editLink": "Editar paxina",
17
+ "page.editLink": "Editar páxina",
18
18
  "page.lastUpdated": "Última actualización:",
19
19
  "page.previousLink": "Anterior",
20
20
  "page.nextLink": "Seguinte",
21
- "page.draft": "This content is a draft and will not be included in production builds.",
22
- "404.text": "Paxina non atopada. Comproba a URL ou intenta usar a barra de busca.",
23
- "aside.note": "Note",
24
- "aside.tip": "Tip",
25
- "aside.caution": "Caution",
26
- "aside.danger": "Danger",
27
- "fileTree.directory": "Directory",
28
- "builtWithStarlight.label": "Built with Starlight",
29
- "heading.anchorLabel": "Section titled “{{title}}”"
21
+ "page.draft": "Este contido é un borrador e non se incluirá nas versións de producción.",
22
+ "404.text": "Páxina non atopada. Comproba a URL ou intenta usar a barra de busca.",
23
+ "aside.note": "Nota",
24
+ "aside.tip": "Consello",
25
+ "aside.caution": "Precaución",
26
+ "aside.danger": "Perigo",
27
+ "expressiveCode.copyButtonCopied": "¡Copiado!",
28
+ "expressiveCode.copyButtonTooltip": "Copiar ao portapapeis",
29
+ "expressiveCode.terminalWindowFallbackTitle": "Fiestra do terminal",
30
+ "fileTree.directory": "Directorio",
31
+ "builtWithStarlight.label": "Feito con Starlight",
32
+ "pagefind.clear_search": "Limpar",
33
+ "pagefind.load_more": "Cargar máis resultados",
34
+ "pagefind.search_label": "Buscar páxina",
35
+ "pagefind.filters_label": "Filtros",
36
+ "pagefind.zero_results": "Ningún resultado para: [SEARCH_TERM]",
37
+ "pagefind.many_results": "[COUNT] resultados para: [SEARCH_TERM]",
38
+ "pagefind.one_result": "[COUNT] resultado para: [SEARCH_TERM]",
39
+ "pagefind.alt_search": "Ningún resultado para [SEARCH_TERM]. Amósanse resultados para: [DIFFERENT_TERM]",
40
+ "pagefind.search_suggestion": "Ningún resultado para [SEARCH_TERM]. Proba algunha destas buscas:",
41
+ "pagefind.searching": "Buscando [SEARCH_TERM]...",
42
+ "heading.anchorLabel": "Sección titulada «{{title}}»"
30
43
  }
package/utils/head.ts CHANGED
@@ -120,7 +120,8 @@ function createHead(defaults: HeadUserConfig, ...heads: HeadConfig[]) {
120
120
  }
121
121
 
122
122
  /**
123
- * Test if a head config object contains a matching `<title>` or `<meta>` or `<link rel="canonical">` tag.
123
+ * Test if a head config object contains a matching `<title>`, `<meta>`, `<link rel="canonical">`
124
+ * or `<link rel="sitemap">` tag.
124
125
  *
125
126
  * For example, will return true if `head` already contains
126
127
  * `<meta name="description" content="A">` and the passed `tag`
@@ -135,7 +136,9 @@ function hasTag(head: HeadConfig, entry: HeadConfig[number]): boolean {
135
136
  return hasOneOf(head, entry, ['name', 'property', 'http-equiv']);
136
137
  case 'link':
137
138
  return head.some(
138
- ({ attrs }) => entry.attrs?.rel === 'canonical' && attrs?.rel === 'canonical'
139
+ ({ attrs }) =>
140
+ (entry.attrs?.rel === 'canonical' && attrs?.rel === 'canonical') ||
141
+ (entry.attrs?.rel === 'sitemap' && attrs?.rel === 'sitemap')
139
142
  );
140
143
  default:
141
144
  return false;