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

[WIP] Version switching #148

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
3 changes: 1 addition & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ bib = CitationBibliography(
style=:numeric # default
)


makedocs(;
sitename = "DocumenterVitepress",
authors = "LuxDL et al.",
Expand All @@ -34,7 +33,7 @@ makedocs(;
format=DocumenterVitepress.MarkdownVitepress(
repo = "github.com/LuxDL/DocumenterVitepress.jl", # this must be the full URL!
devbranch = "master",
devurl = "dev";
devurl = "dev",
),
draft = false,
source = "src",
Expand Down
13 changes: 11 additions & 2 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ import mathjax3 from "markdown-it-mathjax3";
import footnote from "markdown-it-footnote";
import { transformerMetaWordHighlight } from '@shikijs/transformers';

// This exists so that we can interpolate the base path into other variables.
const baseTemp = {
base: 'REPLACE_ME_DOCUMENTER_VITEPRESS',// TODO: replace this in makedocs!
}

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: 'REPLACE_ME_DOCUMENTER_VITEPRESS', // TODO: replace this in makedocs!
base: baseTemp.base,
title: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
description: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
lastUpdated: true,
cleanUrls: true,
outDir: 'REPLACE_ME_DOCUMENTER_VITEPRESS', // This is required for MarkdownVitepress to work correctly...
head: [['link', { rel: 'icon', href: '/DocumenterVitepress.jl/dev/favicon.ico' }]],
head: [
['link', { rel: 'icon', href: 'REPLACE_ME_DOCUMENTER_VITEPRESS_FAVICON' }],
['script', {src: '/versions.js'}],
['script', {src: `${baseTemp.base}siteinfo.js`}]
],

markdown: {
math: true,
Expand Down
3 changes: 2 additions & 1 deletion docs/src/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export default {
'aside-ads-before': () => h(AsideTrustees),
})
},
enhanceApp({ app, router, siteData }) {
async enhanceApp({ app, router, siteData }) {
console.log(window.DOCUMENTER_NEWEST)
enhanceAppWithTabs(app)
}
} satisfies Theme
Loading