diff --git a/src/lib/components/content/heading/h2.astro b/src/lib/components/content/heading/h2.astro new file mode 100644 index 0000000..a6519a6 --- /dev/null +++ b/src/lib/components/content/heading/h2.astro @@ -0,0 +1,32 @@ +--- +import { Icon } from "@iconify/react/dist/iconify.js"; + +const props = Astro.props; +const { slug } = Astro.params; +const { origin, pathname } = Astro.url; + +const currentAnchor = `${origin}${pathname}#${props.id}`; +--- + +

+ + + + +

diff --git a/src/lib/components/content/heading/h3.astro b/src/lib/components/content/heading/h3.astro new file mode 100644 index 0000000..c50a60b --- /dev/null +++ b/src/lib/components/content/heading/h3.astro @@ -0,0 +1,32 @@ +--- +import { Icon } from "@iconify/react/dist/iconify.js"; + +const props = Astro.props; +const { slug } = Astro.params; +const { origin, pathname } = Astro.url; + +const currentAnchor = `${origin}${pathname}#${props.id}`; +--- + +

+ + + + +

diff --git a/src/pages/docs/[...slug].astro b/src/pages/docs/[...slug].astro index de5a81e..902ee1c 100644 --- a/src/pages/docs/[...slug].astro +++ b/src/pages/docs/[...slug].astro @@ -17,6 +17,8 @@ import DocNavigationWrapper from "@/components/elements/DocNavigationWrapper.ast import { Icon } from "@iconify/react"; import BlogListWrapper from "@/plugins/blog-list/BlogListWrapper.astro"; import BlockRenderer from "@/plugins/parser/block-renderer.astro"; +import H2 from "@/components/content/heading/h2.astro"; +import H3 from "@/components/content/heading/h3.astro"; interface Props { element: CollectionEntry<"blog">; } @@ -99,7 +101,13 @@ function pascalCase(str: string) {
@@ -108,9 +116,8 @@ function pascalCase(str: string) { role="separator" class="flex items-center align-center text-center w-full flex-row pt-20" > -
+
+