diff --git a/docs/make.jl b/docs/make.jl index d9d9ef13..9d330fe0 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -24,7 +24,6 @@ bib = CitationBibliography( style=:numeric # default ) - makedocs(; sitename = "DocumenterVitepress", authors = "LuxDL et al.", @@ -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", diff --git a/docs/src/.vitepress/config.mts b/docs/src/.vitepress/config.mts index d81f50f1..2608e015 100644 --- a/docs/src/.vitepress/config.mts +++ b/docs/src/.vitepress/config.mts @@ -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, diff --git a/docs/src/.vitepress/theme/index.ts b/docs/src/.vitepress/theme/index.ts index 5ac1c911..c1819f30 100644 --- a/docs/src/.vitepress/theme/index.ts +++ b/docs/src/.vitepress/theme/index.ts @@ -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 \ No newline at end of file