Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/demo nav #9

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"cssvar.files": [
"./node_modules/open-props/open-props.min.css",
// if you have an alternative path to where your styles are located
// you can add it in this array of files
"./src/styles/variables.css"
],

// you can also add support for autocomplete in other file extensions
"cssvar.extensions": ["css", "html", "jsx", "tsx", "astro", "svelte"]
}
33 changes: 32 additions & 1 deletion astro.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
// Full Astro Configuration API Documentation:
// https://docs.astro.build/reference/configuration-reference

/**
* @typedef {import("hast-util-to-string").Node} Node
*/

// @type-check enabled!
// VSCode and other TypeScript-enabled text editors will provide auto-completion,
// helpful tooltips, and warnings if your exported object is invalid.
// You can disable this by removing "@ts-check" and `@type` comments below.
import astroRemark from "@astrojs/markdown-remark";
import { h } from "hastscript";

/**
* @param {Node} _node
*/
function getHeadingContent(_node) {
return [
h("svg.icon.icon-link", {}, [
h("use", { "xlink:href": "/sprite.svg#link" }),
]),
];
}

// @ts-check
export default /** @type {import('astro').AstroUserConfig} */ ({
buildOptions: {
site: "https://blog.oliverturner.cloud",
},
// Enable the Preact renderer to support Preact JSX components.
// Enable Custom Markdown options, plugins, etc.
markdownOptions: {
render: [
astroRemark,
{
remarkPlugins: ["remark-code-titles"],
rehypePlugins: [
"rehype-slug",
["rehype-autolink-headings", { content: getHeadingContent }],
["rehype-add-classes", { "h1,h2,h3": "title title--link" }],
],
},
],
},

renderers: ["@astrojs/renderer-svelte"],
});
Loading