@farming-labs/astro-theme 0.1.76 → 0.1.78

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/astro-theme",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "Astro UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
5
5
  "keywords": [
6
6
  "astro",
@@ -119,8 +119,8 @@
119
119
  },
120
120
  "dependencies": {
121
121
  "sugar-high": "^0.9.5",
122
- "@farming-labs/docs": "0.1.76",
123
- "@farming-labs/astro": "0.1.76"
122
+ "@farming-labs/astro": "0.1.78",
123
+ "@farming-labs/docs": "0.1.78"
124
124
  },
125
125
  "peerDependencies": {
126
126
  "astro": ">=4.0.0"
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  import DocsPage from "./DocsPage.astro";
3
+ import { toDocsMarkdownUrl } from "@farming-labs/docs";
3
4
 
4
5
  const { data, config = null } = Astro.props;
5
6
 
@@ -71,6 +72,10 @@ const openDocsProviders = (() => {
71
72
  })();
72
73
 
73
74
  const pathname = Astro.url.pathname;
75
+ const pageUrl = typeof data.url === "string" ? data.url : pathname;
76
+ const markdownAlternateHref = config?.staticExport
77
+ ? null
78
+ : toDocsMarkdownUrl(pageUrl, { locale: data.locale });
74
79
  const githubFileUrl = config?.github && data.editOnGithub ? data.editOnGithub : null;
75
80
 
76
81
  const pageActionsPosition = (() => {
@@ -141,6 +146,7 @@ const htmlWithoutFirstH1 = (data.html || "").replace(/<h1[^>]*>[\s\S]*?<\/h1>\s*
141
146
  <head>
142
147
  <title>{data.title}{titleSuffix}</title>
143
148
  {data.description && <meta name="description" content={data.description} />}
149
+ {markdownAlternateHref && <link rel="alternate" type="text/markdown" href={markdownAlternateHref} />}
144
150
  </head>
145
151
 
146
152
  <DocsPage