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

La/hydration error #109

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ jobs:
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
GKSwstype: "100" # for Plots.jl plots (if you have them)
JULIA_DEBUG: "Documenter"
DEBUG: true
DATADEPS_ALWAYS_ACCEPT: true
8 changes: 3 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"devDependencies": {
"markdown-it": "^14.0.0",
"markdown-it": "^14.1.0",
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.0.0-rc.43",
"vitepress-plugin-tabs": "^0.5.0",
"vitest": "^1.3.0"
"vitepress": "^1.0.2",
"vitepress-plugin-tabs": "^0.5.0"
},
"scripts": {
"docs:dev": "vitepress dev build/.documenter",
"docs:build": "vitepress build build/.documenter",
"docs:preview": "vitepress preview build/.documenter"
},
"dependencies": {
"@shikijs/transformers": "^1.1.7",
"markdown-it-footnote": "^4.0.0"
}
}
18 changes: 10 additions & 8 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ import { defineConfig } from 'vitepress'
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import mathjax3 from "markdown-it-mathjax3";
import footnote from "markdown-it-footnote";
import { transformerMetaWordHighlight } from '@shikijs/transformers';

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: 'REPLACE_ME_DOCUMENTER_VITEPRESS',// TODO: replace this in makedocs!
title: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
description: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
title: 'DocumenterVitepress',
description: 'Document your code',
lastUpdated: true,
cleanUrls: true,
outDir: 'REPLACE_ME_DOCUMENTER_VITEPRESS', // This is required for MarkdownVitepress to work correctly...
head: [['link', { rel: 'icon', href: 'REPLACE_ME_DOCUMENTER_VITEPRESS_FAVICON' }]],

markdown: {
math: true,
Expand All @@ -25,13 +23,11 @@ export default defineConfig({
light: "github-light",
dark: "github-dark"
},
codeTransformers: [ transformerMetaWordHighlight(), ],

},
themeConfig: {
outline: 'deep',
// https://vitepress.dev/reference/default-theme-config
logo: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
logo: { src: '/logo.png', width: 24, height: 24 },
search: {
provider: 'local',
options: {
Expand All @@ -46,7 +42,13 @@ export default defineConfig({
{ text: 'API', link: '/api' }
],

sidebar: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
sidebar: [
{ text: 'Home', link: '/' },
{ text: 'Getting Started', link: '/getting_started' },
{ text: 'Markdown', link: '/markdown-examples' },
{ text: 'Code', link: '/code_example' },
{ text: 'API', link: '/api' }
],
editLink: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
socialLinks: [
{ icon: 'github', link: 'REPLACE_ME_DOCUMENTER_VITEPRESS' }
Expand Down
12 changes: 2 additions & 10 deletions docs/src/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
// .vitepress/theme/index.ts
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import AsideTrustees from '../../components/AsideTrustees.vue'

import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
import './style.css'

export default {
extends: DefaultTheme,
Layout() {
return h(DefaultTheme.Layout, null, {
// 'home-hero-info-after': () => h(HomeTrustees),
'aside-ads-before': () => h(AsideTrustees),
})
},
enhanceApp({ app, router, siteData }) {
enhanceApp({ app }) {
enhanceAppWithTabs(app)
}
} satisfies Theme
} satisfies Theme
18 changes: 9 additions & 9 deletions docs/src/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/var
}

/* Fonts */

/*
@font-face {
font-family: JuliaMono-Regular;
src: url("https://cdn.jsdelivr.net/gh/cormullion/juliamono/webfonts/JuliaMono-Regular.woff2");
}
} */

:root {
/* Typography */
--vp-font-family-base: "Barlow", "Inter var experimental", "Inter var",
--vp-font-family-base: "Inter", "Inter var experimental", "Inter var",
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

/* Code Snippet font */
--vp-font-family-mono: JuliaMono-Regular, monospace;
--vp-font-family-mono: "Fira Code", monospace;

}

.mono {
/* .mono { */
/*
Disable contextual alternates (kind of like ligatures but different) in monospace,
which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well.
This is pretty bad for Julia folks reading even though copy+paste retains the same text.
*/
font-feature-settings: 'calt' 0;
pre {
/* font-feature-settings: 'calt' 0; */
/* pre {
font-family: JuliaMono-Light;
};
code {
font-family: JuliaMono-Light;
};
}
}; */
/* } */

/* Colors */

Expand Down
31 changes: 3 additions & 28 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,14 @@ hero:


features:
- icon: <img width="64" height="64" src="https://img.icons8.com/arcade/64/markdown.png" alt="markdown"/>
title: Markdown
- title: Markdown
details: Write in standard markdown syntax
link: /markdown-examples
- icon: <img width="64" height="64" src="https://fredrikekre.github.io/Literate.jl/v2/assets/logo.png" />
title: Literate.jl
- title: Literate.jl
details: Parse scripts into markdown via Literate.jl
link: https://github.com/fredrikekre/Literate.jl
- icon: <svg xmlns="http://www.w3.org/2000/svg" width="30" viewBox="0 0 256 256.32"><defs><linearGradient id="a" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"/><stop offset="100%" stop-color="#BD34FE"/></linearGradient><linearGradient id="b" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"/><stop offset="8.333%" stop-color="#FFDD35"/><stop offset="100%" stop-color="#FFA800"/></linearGradient></defs><path fill="url(#a)" d="M255.153 37.938 134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"/><path fill="url(#b)" d="M185.432.063 96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028 72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"/></svg>
title: VUE components
- title: VUE components
details: Explore the possibilities with VUE components
link: https://vuejs.org/guide/essentials/component-basics
---
```

```@raw html
<p style="margin-bottom:2cm"></p>

<div class="vp-doc" style="width:80%; margin:auto">

<h1> What is DocumenterVitepress.jl? </h1>

DocumenterVitepress is a Markdown backend for Documenter.jl which is designed to work with the [`VitePress`](https://vitepress.dev/) site generator, which is built off `Vue.js`.

It is meant to be used in conjunction with the `vitepress` Node.js package, which is why so much customization is required!

<h2> Basic usage </h2>

If you copy the contents of the `template/` directory into your `docs/` and the `.github/Documenter.yml` file to your repo, you should be good to go and edit docs as usual!

Just remember to edit the navbar in `docs/src/.vitepress/config.mts`, if you want it to be different from the sidebar.

To install a logo or favicon, you can put `logo.png` and `favicon.ico` in `docs/src/assets`, and they will be automatically detected.

</div>
```
8 changes: 1 addition & 7 deletions template/src/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// .vitepress/theme/index.ts
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'

Expand All @@ -8,12 +7,7 @@ import './style.css'

export default {
extends: DefaultTheme,
Layout() {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
enhanceApp({ app }) {
enhanceAppWithTabs(app)
}
} satisfies Theme
Loading