diff options
author | 2022-08-05 14:43:50 -0500 | |
---|---|---|
committer | 2022-08-05 15:43:50 -0400 | |
commit | 471c6f784e21399676c8b2002665ffdf83a1c59e (patch) | |
tree | b39134eb9b53b3a9ef9b987286061215a2af3531 /examples/docs/src | |
parent | 838eb3e5cc523d20aa5fb6b136ed5f6701568b1d (diff) | |
download | astro-471c6f784e21399676c8b2002665ffdf83a1c59e.tar.gz astro-471c6f784e21399676c8b2002665ffdf83a1c59e.tar.zst astro-471c6f784e21399676c8b2002665ffdf83a1c59e.zip |
[markdown] Harder, better, faster, stronger `vite-plugin-markdown` (#4137)
* refactor: vite-plugin-md -> vite-plugin-md-legacy
* wip: add vite-plugin-md
* feat: always apply jsx renderer
* fix: markHTMLString on VNode result
* feat: apply new vite-plugin-markdown!
* fix: add meta export to md
* fix: remove needless $$metadata export
* fix: toggle to legacy plugin on flag
* fix: pass fileId to renderMarkdown
* test: raw and compiled content on plain md
* fix: escape vite env refs
* refactor: astro-md -> legacy-astro-flavored-md, astro-md-mode -> astro-markdown
* fix: import.meta.env refs with tests
* fix: add pkg.json to clientAddress
* fix: prefer JSX integration over Astro runtime
* Revert "fix: prefer JSX integration over Astro runtime"
This reverts commit 3e5fa49344be9c857393da9af095faab152e92e1.
* fix: remove .mdx check on importSource
* chore: changeset
* chore: remove TODO
* fix: add back getHeadings
* fix: add pkg.json to astro-head fixture
* fix: default to Astro renderer for MDX and MD
* feat: add "headings" and "frontmatter" to md layouts
* refactor: remove legacy flag conditionals from legacy plugin
* fix: add back MDX warning when legacy is off
* test: getHeadings() glob
* fix: add error on "astro.headings" access
* feat: update docs example astro.headings => headings
* refactor: readFile as string w/ utf-8
* chore: remove astro metadata TODO
* refactor: stringify HTML once
* fix: add pkg.json to glob-pages-css
Diffstat (limited to 'examples/docs/src')
-rw-r--r-- | examples/docs/src/components/PageContent/PageContent.astro | 7 | ||||
-rw-r--r-- | examples/docs/src/components/RightSidebar/RightSidebar.astro | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/examples/docs/src/components/PageContent/PageContent.astro b/examples/docs/src/components/PageContent/PageContent.astro index e0d96b57c..9af4056c9 100644 --- a/examples/docs/src/components/PageContent/PageContent.astro +++ b/examples/docs/src/components/PageContent/PageContent.astro @@ -2,9 +2,8 @@ import MoreMenu from "../RightSidebar/MoreMenu.astro"; import TableOfContents from "../RightSidebar/TableOfContents"; -const { content, githubEditUrl } = Astro.props; +const { content, headings, githubEditUrl } = Astro.props; const title = content.title; -const headings = content.astro.headings; --- <article id="article" class="content"> @@ -29,9 +28,11 @@ const headings = content.astro.headings; display: flex; flex-direction: column; } - .content > section { + + .content>section { margin-bottom: 4rem; } + .block { display: block; } diff --git a/examples/docs/src/components/RightSidebar/RightSidebar.astro b/examples/docs/src/components/RightSidebar/RightSidebar.astro index c009d2202..71ad5e1c2 100644 --- a/examples/docs/src/components/RightSidebar/RightSidebar.astro +++ b/examples/docs/src/components/RightSidebar/RightSidebar.astro @@ -1,8 +1,7 @@ --- import TableOfContents from "./TableOfContents"; import MoreMenu from "./MoreMenu.astro"; -const { content, githubEditUrl } = Astro.props; -const headings = content.astro.headings; +const { content, headings, githubEditUrl } = Astro.props; --- <nav class="sidebar-nav" aria-labelledby="grid-right"> @@ -18,6 +17,7 @@ const headings = content.astro.headings; position: sticky; top: 0; } + .sidebar-nav-inner { height: 100%; padding: 0; |