From 279a25246260ef95459d29c8029b18bd89adc206 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Sun, 27 Jun 2021 23:27:12 -0700 Subject: [PATCH] astro-docs sync --- docs-www/.gitignore | 18 - docs-www/astro.config.mjs | 5 - docs-www/package.json | 15 - docs-www/public/code.css | 155 -------- docs-www/public/favicon.svg | 11 - docs-www/public/index.css | 350 ------------------ docs-www/public/theme.css | 73 ---- docs-www/public/theme.js | 8 - docs-www/src/components/ArticleFooter.astro | 15 - docs-www/src/components/AvatarList.astro | 74 ---- docs-www/src/components/DocSidebar.tsx | 61 --- docs-www/src/components/EditOnGithub.tsx | 26 -- docs-www/src/components/Note.astro | 52 --- docs-www/src/components/SiteSidebar.astro | 20 - docs-www/src/components/ThemeToggle.tsx | 71 ---- docs-www/src/config.ts | 10 - docs-www/src/layouts/Main.astro | 232 ------------ docs-www/src/pages/example.md | 34 -- docs-www/src/pages/getting-started.md | 59 --- docs/blog/island-architecture.md | 240 ++++++++++++ .../astro-components.md} | 9 + docs/core-concepts/astro-pages.md | 72 ++++ docs/{ => core-concepts}/collections.md | 13 +- docs/core-concepts/component-hydration.md | 37 ++ docs/core-concepts/layouts.md | 155 ++++++++ docs/core-concepts/project-structure.md | 56 +++ .../ui-renderers.md} | 5 +- docs/dev.md | 51 --- docs/examples.md | 8 + docs/guides/data-fetching.md | 25 ++ docs/guides/deploy.md | 241 ++++++++++++ docs/guides/imports.md | 139 +++++++ .../markdown-content.md} | 75 +++- docs/guides/publish-to-npm.md | 83 +++++ docs/{ => guides}/styling.md | 57 +-- {docs-www/src/pages => docs}/index.md | 8 +- docs/installation.md | 93 +++++ docs/integrations/data-sources-cms.md | 4 + docs/integrations/deploy-astro.md | 4 + docs/integrations/developer-tools.md | 4 + docs/integrations/state-management.md | 4 + docs/integrations/styles-and-css-libraries.md | 4 + docs/publishing.md | 94 ----- docs/quick-start.md | 51 +++ docs/{api.md => reference/api-reference.md} | 39 +- docs/reference/builtin-components.md | 32 ++ docs/{cli.md => reference/cli-reference.md} | 52 +-- .../configuration-reference.md} | 9 +- docs/reference/renderer-reference.md | 157 ++++++++ packages/astro/README.md | 24 +- 50 files changed, 1587 insertions(+), 1547 deletions(-) delete mode 100644 docs-www/.gitignore delete mode 100644 docs-www/astro.config.mjs delete mode 100644 docs-www/package.json delete mode 100644 docs-www/public/code.css delete mode 100644 docs-www/public/favicon.svg delete mode 100644 docs-www/public/index.css delete mode 100644 docs-www/public/theme.css delete mode 100644 docs-www/public/theme.js delete mode 100644 docs-www/src/components/ArticleFooter.astro delete mode 100644 docs-www/src/components/AvatarList.astro delete mode 100644 docs-www/src/components/DocSidebar.tsx delete mode 100644 docs-www/src/components/EditOnGithub.tsx delete mode 100644 docs-www/src/components/Note.astro delete mode 100644 docs-www/src/components/SiteSidebar.astro delete mode 100644 docs-www/src/components/ThemeToggle.tsx delete mode 100644 docs-www/src/config.ts delete mode 100644 docs-www/src/layouts/Main.astro delete mode 100644 docs-www/src/pages/example.md delete mode 100644 docs-www/src/pages/getting-started.md create mode 100644 docs/blog/island-architecture.md rename docs/{syntax.md => core-concepts/astro-components.md} (99%) create mode 100644 docs/core-concepts/astro-pages.md rename docs/{ => core-concepts}/collections.md (93%) create mode 100644 docs/core-concepts/component-hydration.md create mode 100644 docs/core-concepts/layouts.md create mode 100644 docs/core-concepts/project-structure.md rename docs/{renderers.md => core-concepts/ui-renderers.md} (99%) delete mode 100644 docs/dev.md create mode 100644 docs/examples.md create mode 100644 docs/guides/data-fetching.md create mode 100644 docs/guides/deploy.md create mode 100644 docs/guides/imports.md rename docs/{markdown.md => guides/markdown-content.md} (57%) create mode 100644 docs/guides/publish-to-npm.md rename docs/{ => guides}/styling.md (98%) rename {docs-www/src/pages => docs}/index.md (85%) create mode 100644 docs/installation.md create mode 100644 docs/integrations/data-sources-cms.md create mode 100644 docs/integrations/deploy-astro.md create mode 100644 docs/integrations/developer-tools.md create mode 100644 docs/integrations/state-management.md create mode 100644 docs/integrations/styles-and-css-libraries.md delete mode 100644 docs/publishing.md create mode 100644 docs/quick-start.md rename docs/{api.md => reference/api-reference.md} (88%) create mode 100644 docs/reference/builtin-components.md rename docs/{cli.md => reference/cli-reference.md} (79%) rename docs/{config.md => reference/configuration-reference.md} (78%) create mode 100644 docs/reference/renderer-reference.md diff --git a/docs-www/.gitignore b/docs-www/.gitignore deleted file mode 100644 index d436c6dad..000000000 --- a/docs-www/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# build output -dist - -# dependencies -node_modules/ -.snowpack/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/docs-www/astro.config.mjs b/docs-www/astro.config.mjs deleted file mode 100644 index d97e2804d..000000000 --- a/docs-www/astro.config.mjs +++ /dev/null @@ -1,5 +0,0 @@ -export default { - renderers: [ - '@astrojs/renderer-preact' - ] -}; diff --git a/docs-www/package.json b/docs-www/package.json deleted file mode 100644 index 624e76e67..000000000 --- a/docs-www/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "docs-www", - "version": "0.0.1", - "private": true, - "scripts": { - "start": "astro dev", - "build": "astro build" - }, - "devDependencies": { - "astro": "^0.15.0" - }, - "snowpack": { - "workspaceRoot": ".." - } -} diff --git a/docs-www/public/code.css b/docs-www/public/code.css deleted file mode 100644 index 54b2c5094..000000000 --- a/docs-www/public/code.css +++ /dev/null @@ -1,155 +0,0 @@ -.language-css > code, -.language-sass > code, -.language-scss > code { - color: #fd9170; -} - -[class*="language-"] .namespace { - opacity: 0.7; -} - -.token.atrule { - color: #c792ea; -} - -.token.attr-name { - color: #ffcb6b; -} - -.token.attr-value { - color: #a5e844; -} - -.token.attribute { - color: #a5e844; -} - -.token.boolean { - color: #c792ea; -} - -.token.builtin { - color: #ffcb6b; -} - -.token.cdata { - color: #80cbc4; -} - -.token.char { - color: #80cbc4; -} - -.token.class { - color: #ffcb6b; -} - -.token.class-name { - color: #f2ff00; -} - -.token.comment { - color: #616161; -} - -.token.constant { - color: #c792ea; -} - -.token.deleted { - color: #ff6666; -} - -.token.doctype { - color: #616161; -} - -.token.entity { - color: #ff6666; -} - -.token.function { - color: #c792ea; -} - -.token.hexcode { - color: #f2ff00; -} - -.token.id { - color: #c792ea; - font-weight: bold; -} - -.token.important { - color: #c792ea; - font-weight: bold; -} - -.token.inserted { - color: #80cbc4; -} - -.token.keyword { - color: #c792ea; -} - -.token.number { - color: #fd9170; -} - -.token.operator { - color: #89ddff; -} - -.token.prolog { - color: #616161; -} - -.token.property { - color: #80cbc4; -} - -.token.pseudo-class { - color: #a5e844; -} - -.token.pseudo-element { - color: #a5e844; -} - -.token.punctuation { - color: #89ddff; -} - -.token.regex { - color: #f2ff00; -} - -.token.selector { - color: #ff6666; -} - -.token.string { - color: #a5e844; -} - -.token.symbol { - color: #c792ea; -} - -.token.tag { - color: #ff6666; -} - -.token.unit { - color: #fd9170; -} - -.token.url { - color: #ff6666; -} - -.token.variable { - color: #ff6666; -} diff --git a/docs-www/public/favicon.svg b/docs-www/public/favicon.svg deleted file mode 100644 index 542f90aec..000000000 --- a/docs-www/public/favicon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/docs-www/public/index.css b/docs-www/public/index.css deleted file mode 100644 index c5ae87f5c..000000000 --- a/docs-www/public/index.css +++ /dev/null @@ -1,350 +0,0 @@ -@import './theme'; -@import './code'; - -* { - box-sizing: border-box; - margin: 0; -} - -:root { - --user-font-scale: 1rem - 16px; - --max-width: calc(100% - 2rem); -} - -@media (min-width: 50em) { - :root { - --max-width: 48em; - } -} - -body { - display: flex; - flex-direction: column; - min-height: 100vh; - font-family: var(--font-body); - font-size: 1rem; - font-size: clamp(0.875rem, 0.4626rem + 1.0309vw + var(--user-font-scale), 1.125rem); - line-height: 1.625; -} - -nav ul { - list-style: none; - padding: 0; -} - -.content main > * + * { - margin-top: 1rem; -} - -/* Typography */ -:is(h1, h2, h3, h4, h5, h6) { - margin-bottom: 1.38rem; - font-weight: 400; - line-height: 1.3; -} - -:is(h1, h2) { - max-width: 40ch; -} - -:is(h2, h3):not(:first-child) { - margin-top: 3rem; -} - -h1 { - font-size: clamp(2.488rem, 1.9240rem + 1.4100vw, 3.052rem); -} - -h2 { - font-size: clamp(2.074rem, 1.7070rem + 0.9175vw, 2.441rem); -} - -h3 { - font-size: clamp(1.728rem, 1.5030rem + 0.5625vw, 1.953rem); -} - -h4 { - font-size: clamp(1.44rem, 1.3170rem + 0.3075vw, 1.563rem); -} - -h5 { - font-size: clamp(1.2rem, 1.1500rem + 0.1250vw, 1.25rem); -} - -p { - color: var(--theme-text-light); -} - -small, .text_small { - font-size: 0.833rem; -} - -a { - color: var(--theme-accent); - font-weight: 400; - text-underline-offset: 0.08em; - text-decoration: none; - display: inline-flex; - align-items: center; - gap: 0.5rem; -} - -a > code:not([class*="language"]) { - position: relative; - color: var(--theme-accent); - background: transparent; - text-underline-offset: var(--padding-block); -} - -a > code:not([class*="language"])::before { - content: ''; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - display: block; - background: var(--theme-accent); - opacity: var(--theme-accent-opacity); - border-radius: var(--border-radius); -} - -a:hover, -a:focus { - text-decoration: underline; -} - -a:focus { - outline: 2px solid currentColor; - outline-offset: 0.25em; -} - -strong { - font-weight: 600; - color: inherit; -} - -/* Supporting Content */ - -code:not([class*="language"]) { - --border-radius: 3px; - --padding-block: 0.2rem; - --padding-inline: 0.33rem; - - font-family: var(--font-mono); - font-size: .85em; - color: inherit; - background-color: var(--theme-code-inline-bg); - padding: var(--padding-block) var(--padding-inline); - margin: calc(var(--padding-block) * -1) -0.125em; - border-radius: var(--border-radius); -} - -pre > code:not([class*="language"]) { - background-color: transparent; - padding: 0; - margin: 0; - border-radius: 0; - color: inherit; -} - -pre { - position: relative; - background-color: var(--theme-code-bg); - color: var(--theme-code-text); - --padding-block: 1rem; - --padding-inline: 2rem; - padding: var(--padding-block) var(--padding-inline); - padding-right: calc(var(--padding-inline) * 2); - margin-left: calc(50vw - var(--padding-inline)); - transform: translateX(-50vw); - - line-height: 1.414; - width: calc(100vw + 4px); - max-width: calc(100% + (var(--padding-inline) * 2)); - overflow-y: hidden; - overflow-x: auto; -} - -@media (min-width: 37.75em) { - pre { - --padding-inline: 1.25rem; - border-radius: 8px; - } -} - -blockquote { - margin: 2rem 0; - padding: 0.5em 1rem; - border-left: 3px solid rgba(0, 0, 0, 0.35); - background-color: rgba(0, 0, 0, 0.05); - border-radius: 0 0.25rem 0.25rem 0; -} - -.flex { - display: flex; - align-items: center; -} - -header button { - background-color: var(--theme-bg); -} -header button:hover, -header button:focus { - background: var(--theme-text); - color: var(--theme-bg); -} - -button { - display: flex; - align-items: center; - justify-items: center; - gap: 0.25em; - padding: 0.33em 0.67em; - border: 0; - background: var(--theme-bg); - display: flex; - font-size: 1rem; - align-items: center; - gap: 0.25em; - border-radius: 99em; - background-color: var(--theme-bg); -} -button:hover { - -} - -#theme-toggle { - display: flex; - align-items: center; - gap: 0.25em; - padding: 0.33em 0.67em; - margin-left: -0.67em; - margin-right: -0.67em; - border-radius: 99em; - background-color: var(--theme-bg); -} -#theme-toggle:focus-within { - outline: 2px solid transparent; - box-shadow: 0 0 0 0.08em var(--theme-accent), 0 0 0 0.12em white; -} - -#theme-toggle > label { - position: relative; - display: flex; - align-items: center; - justify-content: center; - font-size: 1.5rem; - width: 1.5rem; - height: 1.5rem; - opacity: 0.5; - transition: transform 120ms ease-out, opacity 120ms ease-out; -} - -#theme-toggle > label:hover, -#theme-toggle > label:focus { - transform: scale(1.125); - opacity: 1; -} - -#theme-toggle .checked { - color: var(--theme-accent); - transform: scale(1.125); - opacity: 1; -} - -input[name="theme-toggle"] { - position: absolute; - opacity: 0; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; -} - -nav h4 { - font-weight: 400; - font-size: 1.25rem; - margin: 0; - margin-bottom: 1em; -} - -.edit-on-github, -.header-link { - font-size: 1rem; - padding-left: 1rem; - border-left: 4px solid var(--theme-divider); -} - -.edit-on-github:hover, -.edit-on-github:focus, -.header-link:hover, -.header-link:focus { - color: var(--theme-text-light); - border-left-color: var(--theme-text-lighter); -} - -.header-link:focus-within { - color: var(--theme-text-light); - border-left-color: var(--theme-text-lighter); -} - -.header-link.active { - border-left-color: var(--theme-accent); - color: var(--theme-accent); -} - -.header-link.depth-2 { - font-weight: 600; -} - -.header-link.depth-3 { - padding-left: 2rem; -} -.header-link.depth-4 { - padding-left: 3rem; -} - -.edit-on-github, -.header-link a { - font: inherit; - color: inherit; - text-decoration: none; -} - -.edit-on-github { - margin-top: 2rem; - text-decoration: none; -} -.edit-on-github > * { - text-decoration: none; -} - -.nav-link { - font-size: 1rem; - margin-bottom: 0; - transform: translateX(0); - transition: 120ms transform ease-out; -} - -.nav-link:hover, -.nav-link:focus { - color: var(--theme-text-lighter); - transform: translateX(0.25em); -} - -.nav-link:focus-within { - color: var(--theme-text-lighter); - transform: translateX(0.25em); -} - -.nav-link a { - font: inherit; - color: inherit; - text-decoration: none; -} - -.nav-groups > li + li { - margin-top: 2rem; -} diff --git a/docs-www/public/theme.css b/docs-www/public/theme.css deleted file mode 100644 index d381604c8..000000000 --- a/docs-www/public/theme.css +++ /dev/null @@ -1,73 +0,0 @@ -:root { - --font-fallback: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji; - --font-body: system-ui, var(--font-fallback); - --font-mono: source-code-pro,Menlo,Monaco,Consolas,'Courier New',monospace; - - --color-white: #FFF; - --color-black: #000014; - - --color-gray-50: #F9FAFB; - --color-gray-100: #F3F4F6; - --color-gray-200: #E5E7EB; - --color-gray-300: #D1D5DB; - --color-gray-400: #9CA3AF; - --color-gray-500: #6B7280; - --color-gray-600: #4B5563; - --color-gray-700: #374151; - --color-gray-800: #1F2937; - --color-gray-900: #111827; - - --color-blue: #3894FF; - --color-blue-rgb: 56,148,255; - --color-green: #17C083; - --color-green-rgb: 23,192,131; - --color-orange: #FF5D01; - --color-orange-rgb: 255,93,1; - --color-purple: #882DE7; - --color-purple-rgb: 136,45,231; - --color-red: #FF1639; - --color-red-rgb: 255,22,57; - --color-yellow: #FFBE2D; - --color-yellow-rgb: 255,190,45; -} - -:root { - color-scheme: light; - --theme-accent: var(--color-blue); - --theme-accent-rgb: var(--color-blue-rgb); - --theme-accent-opacity: 0.1; - --theme-divider: var(--color-gray-100); - --theme-text: var(--color-gray-800); - --theme-text-light: var(--color-gray-600); - --theme-text-lighter: var(--color-gray-400); - --theme-bg: var(--color-white); - --theme-bg-offset: var(--color-gray-100); - --theme-bg-accent: rgba(var(--theme-accent-rgb), var(--theme-accent-opacity)); - --theme-code-inline-bg: var(--color-gray-100); - --theme-code-text: var(--color-gray-100); - --theme-code-bg: var(--color-gray-700); -} - -body { - background: var(--theme-bg); - color: var(--theme-text); -} - -:root.theme-dark { - color-scheme: dark; - --theme-accent-opacity: 0.3; - --theme-divider: var(--color-gray-900); - --theme-text: var(--color-gray-200); - --theme-text-light: var(--color-gray-400); - --theme-text-lighter: var(--color-gray-600); - --theme-bg: var(--color-black); - --theme-bg-offset: var(--color-gray-900); - --theme-code-inline-bg: var(--color-gray-800); - --theme-code-text: var(--color-gray-200); - --theme-code-bg: var(--color-gray-900); -} - -::selection { - color: var(--theme-accent); - background-color: rgba(var(--theme-accent-rgb), var(--theme-accent-opacity)); -} diff --git a/docs-www/public/theme.js b/docs-www/public/theme.js deleted file mode 100644 index d75d0bf99..000000000 --- a/docs-www/public/theme.js +++ /dev/null @@ -1,8 +0,0 @@ -(() => { - const root = document.documentElement; - if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) { - root.classList.add('theme-dark'); - } else { - root.classList.remove('theme-dark'); - } -})(); diff --git a/docs-www/src/components/ArticleFooter.astro b/docs-www/src/components/ArticleFooter.astro deleted file mode 100644 index 8078e2cc3..000000000 --- a/docs-www/src/components/ArticleFooter.astro +++ /dev/null @@ -1,15 +0,0 @@ ---- -import AvatarList from './AvatarList.astro'; ---- - - - - diff --git a/docs-www/src/components/AvatarList.astro b/docs-www/src/components/AvatarList.astro deleted file mode 100644 index aafcb371b..000000000 --- a/docs-www/src/components/AvatarList.astro +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/docs-www/src/components/DocSidebar.tsx b/docs-www/src/components/DocSidebar.tsx deleted file mode 100644 index 076d460cc..000000000 --- a/docs-www/src/components/DocSidebar.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h } from 'preact'; -import { useState, useEffect, useRef } from 'preact/hooks'; -import EditOnGithub from './EditOnGithub'; - -const DocSidebar: FunctionalComponent<{ headers: any[]; editHref: string }> = ({ headers = [], editHref }) => { - const itemOffsets = useRef([]); - const [activeId, setActiveId] = useState(undefined); - - useEffect(() => { - const getItemOffsets = () => { - const titles = document.querySelectorAll('article :is(h2, h3, h4)'); - itemOffsets.current = Array.from(titles).map((title) => ({ - id: title.id, - topOffset: title.getBoundingClientRect().top + window.scrollY, - })); - }; - - const onScroll = () => { - const itemIndex = itemOffsets.current.findIndex((item) => item.topOffset > window.scrollY + window.innerHeight / 3); - if (itemIndex === 0) { - setActiveId(undefined); - } else if (itemIndex === -1) { - setActiveId(itemOffsets.current[itemOffsets.current.length - 1].id); - } else { - setActiveId(itemOffsets.current[itemIndex - 1].id); - } - }; - - getItemOffsets(); - window.addEventListener('resize', getItemOffsets); - window.addEventListener('scroll', onScroll); - - return () => { - window.removeEventListener('resize', getItemOffsets); - window.removeEventListener('scroll', onScroll); - }; - }, []); - - return ( - - ); -}; - -export default DocSidebar; diff --git a/docs-www/src/components/EditOnGithub.tsx b/docs-www/src/components/EditOnGithub.tsx deleted file mode 100644 index f7478934f..000000000 --- a/docs-www/src/components/EditOnGithub.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h } from 'preact'; - -const EditOnGithub: FunctionalComponent<{ href: string }> = ({ href }) => { - return ( - - - - - - - Edit on GitHub - - ); -}; - -export default EditOnGithub; diff --git a/docs-www/src/components/Note.astro b/docs-www/src/components/Note.astro deleted file mode 100644 index c57ede3a0..000000000 --- a/docs-www/src/components/Note.astro +++ /dev/null @@ -1,52 +0,0 @@ ---- -export interface Props { - title: string; - type?: 'tip' | 'warning' | 'error' -} -const { type = 'tip', title } = Astro.props; ---- - - - - diff --git a/docs-www/src/components/SiteSidebar.astro b/docs-www/src/components/SiteSidebar.astro deleted file mode 100644 index 0fbad0c83..000000000 --- a/docs-www/src/components/SiteSidebar.astro +++ /dev/null @@ -1,20 +0,0 @@ ---- -import { sidebar } from '../config.ts'; ---- - - diff --git a/docs-www/src/components/ThemeToggle.tsx b/docs-www/src/components/ThemeToggle.tsx deleted file mode 100644 index 5a5061c15..000000000 --- a/docs-www/src/components/ThemeToggle.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h, Fragment } from 'preact'; -import { useState, useEffect } from 'preact/hooks'; - -const themes = ['system', 'light', 'dark']; - -const icons = [ - - - , - - - , - - - , -]; - -const ThemeToggle: FunctionalComponent = () => { - const [theme, setTheme] = useState(themes[0]); - - useEffect(() => { - const user = localStorage.getItem('theme'); - if (!user) return; - setTheme(user); - }, []); - - useEffect(() => { - const root = document.documentElement; - if (theme === 'system') { - localStorage.removeItem('theme'); - if (window.matchMedia('(prefers-color-scheme: dark)').matches) { - root.classList.add('theme-dark'); - } else { - root.classList.remove('theme-dark'); - } - } else { - localStorage.setItem('theme', theme); - if (theme === 'light') { - root.classList.remove('theme-dark'); - } else { - root.classList.add('theme-dark'); - } - } - }, [theme]); - - return ( -
- {themes.map((t, i) => { - const icon = icons[i]; - const checked = t === theme; - return ( - - ); - })} -
- ); -}; - -export default ThemeToggle; diff --git a/docs-www/src/config.ts b/docs-www/src/config.ts deleted file mode 100644 index 5ec22a02b..000000000 --- a/docs-www/src/config.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const sidebar = [ - { - text: 'Introduction', - link: '', // No leading slash needed, so this links to the homepage - children: [ - { text: 'Getting Started', link: 'getting-started' }, - { text: 'Example', link: 'example' }, - ], - }, -]; diff --git a/docs-www/src/layouts/Main.astro b/docs-www/src/layouts/Main.astro deleted file mode 100644 index 0f1e6efe4..000000000 --- a/docs-www/src/layouts/Main.astro +++ /dev/null @@ -1,232 +0,0 @@ ---- -import ArticleFooter from '../components/ArticleFooter.astro'; -import SiteSidebar from '../components/SiteSidebar.astro'; -import ThemeToggle from '../components/ThemeToggle.tsx'; -import DocSidebar from '../components/DocSidebar.tsx'; - -const { content } = Astro.props; -const headers = content?.astro?.headers; -let editHref = Astro?.request?.url?.pathname?.slice(1) ?? ''; -if (editHref === '') editHref = `index`; -editHref = `https://github.com/snowpackjs/astro/tree/main/examples/doc/src/pages/${editHref}.md` ---- - - - - {content.title} - - -