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

feat(docs): add header links #2882

Merged
merged 2 commits into from
Sep 24, 2024
Merged
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
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @BlairCurrey. It's great. Can we maybe just edit the styling a bit because otherwise we have an underline on top of our highlight underlines and it looks odd.

How about this instead?

/* Heading styles */
.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);
}

Copy link
Contributor Author

@BlairCurrey BlairCurrey Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. updated.

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
Loading