Skip to content
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ Manifest.toml
sandbox/

.vscode/

docs/node_modules/

docs/package-lock.json
4 changes: 4 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
node_modules/
package-lock.json
Manifest.toml
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[deps]
DocThemeIndigo = "8bac0ac5-51bf-41f9-885e-2bf1ac2bec5f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
ReefModEngine = "f4ffb74a-bba7-4ac3-ad08-f8621d7c6d1d"
26 changes: 9 additions & 17 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,43 +1,35 @@
using Documenter, DocumenterVitepress
using DocumenterTools
using ReefModEngine

using Documenter
using DocThemeIndigo

using Logging

Logging.disable_logging(Logging.Warn)

# Generate the indigo theme css
indigo = DocThemeIndigo.install(ReefModEngine)

makedocs(;
sitename="ReefModEngine.jl",
modules=[ReefModEngine],
clean=true,
doctest=true,
authors="Iwanaga et al.",
checkdocs=:all,
format=Documenter.HTML(
assets=String[indigo],
format=DocumenterVitepress.MarkdownVitepress(
repo="github.com/open-AIMS/ReefModEngine.jl", # this must be the full URL!
devbranch="main",
devurl="dev";
),
draft=false,
source="src",
build="build",
warnonly=true,
pages=[
"index.md",
"getting_started.md",
"api.md"
]
warnonly=true
)

# Enable logging to console again
Logging.disable_logging(Logging.BelowMinLevel)

deploydocs(;
repo="github.com/open-AIMS/ReefModEngine.jl.git",
target="build",
target="build", # this is where Vitepress stores its output
branch = "gh-pages",
devbranch="main",
push_preview = false
push_preview=true
)
37 changes: 37 additions & 0 deletions docs/makelocal.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Documenter, DocumenterVitepress
using DocumenterTools
using ReefModEngine
using Logging

# Logging.disable_logging(Logging.Warn)

makedocs(;
sitename="ReefModEngine.jl",
modules=[ReefModEngine],
clean=true,
doctest=true,
authors="Iwanaga et al.",
checkdocs=:all,
format=DocumenterVitepress.MarkdownVitepress(
repo="github.com/open-AIMS/ReefModEngine.jl", # this must be the full URL!
devbranch="main",
devurl="dev",
build_vitepress=false;
),
remotes=nothing,
draft=true,
source="src",
build="build",
warnonly=true
)

# Enable logging to console again
# Logging.disable_logging(Logging.BelowMinLevel)

deploydocs(;
repo="github.com/open-AIMS/ReefModEngine.jl.git",
target="build", # this is where Vitepress stores its output
branch = "gh-pages",
devbranch="main",
push_preview = true
)
16 changes: 16 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"scripts": {
"docs:dev": "vitepress dev build/.documenter",
"docs:build": "vitepress build build/.documenter",
"docs:preview": "vitepress preview build/.documenter"
},
"devDependencies": {
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.0.2",
"vitepress-plugin-tabs": "^0.5.0"
},
"dependencies": {
"markdown-it": "^14.1.0",
"markdown-it-footnote": "^4.0.0"
}
}
67 changes: 67 additions & 0 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { defineConfig } from 'vitepress'
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import mathjax3 from "markdown-it-mathjax3";
import footnote from "markdown-it-footnote";

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
title: "ReefModEngine",
description: "Julia interface to the ReefMod",
lastUpdated: true,
cleanUrls: true,
outDir: 'REPLACE_ME_DOCUMENTER_VITEPRESS', // This is required for MarkdownVitepress to work correctly...
head: [['link', { rel: 'icon', href: '/public/favicon.ico' }]],

markdown: {
math: true,
config(md) {
md.use(tabsMarkdownPlugin), md.use(mathjax3), md.use(footnote)
},
theme: {
light: "github-light",
dark: "github-dark"
}
},

themeConfig: {
outline: 'deep',
// https://vitepress.dev/reference/default-theme-config
// logo: { src: '/logo.png', width: 24, height: 24 },
search: {
provider: 'local',
options: {
detailedView: true
}
},
nav: [
{ text: 'Home', link: '/' },
{ text: 'Getting Started', link: '/getting_started' },
{ text: 'API', link: '/api' }
// {
// text: 'Examples',
// items: [
// ]
// },
],

sidebar: [
{
text: 'Getting Started', link: '/getting_started',
// items: [
// { text: 'Link text', link: '/url_path' },
// ]
}
],
editLink: {
pattern: 'https://github.com/open-AIMS/ReefModEngine.jl/edit/main/docs/src/:path'
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/open-AIMS/ReefModEngine.jl' }
],
footer: {
message: 'Made with <a href="https://luxdl.github.io/DocumenterVitepress.jl/" target="_blank"><strong>DocumenterVitepress.jl</strong></a> <br>',
copyright: `© Copyright ${new Date().getUTCFullYear()}. Released under the MIT License.`
}
}
})
21 changes: 21 additions & 0 deletions docs/src/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// .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 }) {
enhanceAppWithTabs(app)
}
} satisfies Theme
Loading