mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
fix: fixed rehype & remark plugins
This commit is contained in:
parent
793d621369
commit
11baec1177
@ -6,6 +6,10 @@ import solid from "@astrojs/solid-js";
|
||||
import image from "@astrojs/image";
|
||||
// import compress from "astro-compress";
|
||||
import mdx from "@astrojs/mdx";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import remarkSmartypants from "remark-smartypants";
|
||||
import rehypeSlug from "rehype-slug";
|
||||
import rehypeAutolinkHeadings from "rehype-autolink-headings";
|
||||
|
||||
const createAnchorLabel = (heading) => {
|
||||
const node = h("span.anchor-label", escape(heading));
|
||||
@ -16,15 +20,15 @@ const createAnchorLabel = (heading) => {
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://yarkov.tech",
|
||||
integrations: [solid(), image(), mdx()],
|
||||
trailingSlash: "always",
|
||||
markdown: {
|
||||
syntaxHighlight: "prism",
|
||||
remarkPlugins: ["remark-gfm", "remark-smartypants"],
|
||||
integrations: [
|
||||
solid(),
|
||||
image(),
|
||||
mdx({
|
||||
remarkPlugins: [remarkGfm, remarkSmartypants],
|
||||
rehypePlugins: [
|
||||
"rehype-slug",
|
||||
rehypeSlug,
|
||||
[
|
||||
"rehype-autolink-headings",
|
||||
rehypeAutolinkHeadings,
|
||||
{
|
||||
properties: {
|
||||
class: "anchor-link",
|
||||
@ -61,6 +65,11 @@ export default defineConfig({
|
||||
},
|
||||
],
|
||||
],
|
||||
}),
|
||||
],
|
||||
trailingSlash: "always",
|
||||
markdown: {
|
||||
syntaxHighlight: "prism",
|
||||
},
|
||||
vite: {
|
||||
ssr: {
|
||||
|
||||
@ -17,10 +17,6 @@
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
& ul {
|
||||
padding-left: 1.5rem;
|
||||
line-height: var(--line-height-base);
|
||||
@ -177,6 +173,7 @@
|
||||
& .anchor-icon {
|
||||
position: absolute;
|
||||
left: -25px;
|
||||
top: -13px;
|
||||
}
|
||||
& svg {
|
||||
vertical-align: middle;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user