Skip to content

Commit

Permalink
feat(docs): add header links (#2882)
Browse files Browse the repository at this point in the history
* feat(docs): add header links

* style(documentation): update header link styling
  • Loading branch information
BlairCurrey authored Sep 24, 2024
1 parent 2ca8bf4 commit 00e9bb3
Show file tree
Hide file tree
Showing 4 changed files with 78 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
10 changes: 10 additions & 0 deletions packages/documentation/src/styles/rafiki.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,13 @@
.accounting-table.accounting-table tr td {
text-align: center;
}

.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) > a {
color: inherit;
text-decoration: none;
transition: color 0.2s ease-in-out;
}

.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) > a:hover {
color: var(--sl-color-accent-high);
}
Loading

0 comments on commit 00e9bb3

Please sign in to comment.