Skip to content

Commit

Permalink
feat(docs): add header links
Browse files Browse the repository at this point in the history
  • Loading branch information
BlairCurrey committed Aug 22, 2024
1 parent b08a157 commit cad885c
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 188 deletions.
13 changes: 12 additions & 1 deletion packages/documentation/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@ import remarkMath from 'remark-math'
import rehypeMathjax from 'rehype-mathjax'
import GraphQL from 'astro-graphql-plugin'
import starlightLinksValidator from 'starlight-links-validator'
import { rehypeHeadingIds } from '@astrojs/markdown-remark'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'

// https://astro.build/config
export default defineConfig({
site: 'https://rafiki.dev',
outDir: './build',
markdown: {
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeMathjax]
rehypePlugins: [
rehypeMathjax,
rehypeHeadingIds,
[
rehypeAutolinkHeadings,
{
behavior: 'wrap'
}
]
]
},
integrations: [
starlight({
Expand Down
2 changes: 2 additions & 0 deletions packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/markdown-remark": "^5.2.0",
"@astrojs/starlight": "^0.25.5",
"@interledger/docs-design-system": "^0.5.2",
"astro": "4.13.4",
"astro-graphql-plugin": "^0.3.0",
"graphql": "16.8.1",
"mermaid": "^10.9.1",
"rehype-autolink-headings": "^7.1.0",
"rehype-mathjax": "^6.0.0",
"remark-math": "^6.0.0",
"starlight-links-validator": "^0.10.1"
Expand Down
9 changes: 9 additions & 0 deletions packages/documentation/src/styles/rafiki.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,12 @@
.accounting-table.accounting-table tr td {
text-align: center;
}

.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) > a {
color: var(--sl-color-white);
text-decoration: none;

&:hover {
text-decoration: underline;
}
}
Loading

0 comments on commit cad885c

Please sign in to comment.