-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DocumenterVitepress support and update documentation configuration
- Loading branch information
1 parent
9a3110d
commit 734aa7a
Showing
6 changed files
with
314 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[deps] | ||
BioMarkovChains = "f861b655-cb5f-42ce-b66a-341b542d4f2c" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365" | ||
GeneFinder = "2bc6ee46-2158-4f5a-a720-91cb2d7cee64" | ||
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,64 @@ | ||
using GeneFinder | ||
using Documenter | ||
using DocumenterVitepress | ||
|
||
DocMeta.setdocmeta!(GeneFinder, :DocTestSetup, :(using GeneFinder); recursive = true) | ||
|
||
# makedocs(; | ||
# modules = [GeneFinder], | ||
# authors = "Camilo García-Botero", | ||
# repo = "https://github.com/camilogarciabotero/GeneFinder.jl/", | ||
# sitename = "GeneFinder.jl", | ||
# format = Documenter.HTML(; | ||
# mathengine=MathJax3(), | ||
# # prettyurls = get(ENV, "CI", "false") == "true", | ||
# canonical = "https://camilogarciabotero.github.io/GeneFinder.jl", | ||
# repolink = "https://github.com/camilogarciabotero/GeneFinder.jl", | ||
# edit_link = "main", | ||
# ), | ||
# pages = [ | ||
# "Home" => "index.md", | ||
# "Finding ORFs" => "naivefinder.md", | ||
# "Scoring ORFs" => "features.md", | ||
# "A Simple Coding Rule" => "simplecodingrule.md", | ||
# "Wrtiting ORFs In Files" => "iodocs.md", | ||
# "API" => "api.md", | ||
# # "Roadmap" => "roadmap.md", | ||
# ], | ||
# warnonly = true, | ||
# ) | ||
|
||
deploydocs(; repo = "https://github.com/camilogarciabotero/GeneFinder.jl", devbranch = "main") | ||
|
||
|
||
fmt = DocumenterVitepress.MarkdownVitepress( | ||
repo = "https://github.com/camilogarciabotero/GeneFinder.jl", | ||
devbranch = "main", | ||
) | ||
|
||
pgs = [ | ||
"Home" => "index.md", | ||
"Finding ORFs" => "naivefinder.md", | ||
"Scoring ORFs" => "features.md", | ||
"A Simple Coding Rule" => "simplecodingrule.md", | ||
"Wrtiting ORFs In Files" => "iodocs.md", | ||
"API" => "api.md", | ||
] | ||
|
||
makedocs(; | ||
modules = [GeneFinder], | ||
authors = "Camilo García-Botero", | ||
repo = "https://github.com/camilogarciabotero/GeneFinder.jl/", | ||
repo = Remotes.GitHub("camilogarciabotero", "GeneFinder.jl"), | ||
sitename = "GeneFinder.jl", | ||
format = Documenter.HTML(; | ||
mathengine=MathJax3(), | ||
# prettyurls = get(ENV, "CI", "false") == "true", | ||
canonical = "https://camilogarciabotero.github.io/GeneFinder.jl", | ||
repolink = "https://github.com/camilogarciabotero/GeneFinder.jl", | ||
edit_link = "main", | ||
), | ||
pages = [ | ||
"Home" => "index.md", | ||
"Finding ORFs" => "naivefinder.md", | ||
"Scoring ORFs" => "features.md", | ||
"A Simple Coding Rule" => "simplecodingrule.md", | ||
"Wrtiting ORFs In Files" => "iodocs.md", | ||
"API" => "api.md", | ||
# "Roadmap" => "roadmap.md", | ||
], | ||
format = fmt, | ||
pages = pgs, | ||
warnonly = true, | ||
) | ||
|
||
deploydocs(; repo = "https://github.com/camilogarciabotero/GeneFinder.jl", devbranch = "main") | ||
deploydocs(; | ||
repo = "https://github.com/camilogarciabotero/GeneFinder.jl", | ||
devbranch = "main", | ||
target = "build", # this is where Vitepress stores its output | ||
branch = "gh-pages", | ||
push_preview = true | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
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',// TODO: replace this in makedocs! | ||
title: 'BioVossEncoder.jl', | ||
description: "A VitePress Site", | ||
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' }]], | ||
ignoreDeadLinks: true, | ||
|
||
markdown: { | ||
math: true, | ||
config(md) { | ||
md.use(tabsMarkdownPlugin), | ||
md.use(mathjax3), | ||
md.use(footnote) | ||
}, | ||
theme: { | ||
light: "github-light", | ||
dark: "github-dark"} | ||
}, | ||
themeConfig: { | ||
outline: 'deep', | ||
logo: 'REPLACE_ME_DOCUMENTER_VITEPRESS', | ||
// logo: { src: '/logo.png', width: 24, height: 24 }, | ||
search: { | ||
provider: 'local', | ||
options: { | ||
detailedView: true | ||
} | ||
}, | ||
nav: 'REPLACE_ME_DOCUMENTER_VITEPRESS', | ||
sidebar: 'REPLACE_ME_DOCUMENTER_VITEPRESS', | ||
editLink: 'REPLACE_ME_DOCUMENTER_VITEPRESS', | ||
socialLinks: [ | ||
{ icon: 'github', link: 'REPLACE_ME_DOCUMENTER_VITEPRESS' } | ||
], | ||
footer: { | ||
message: 'Made with <a href="https://luxdl.github.io/DocumenterVitepress.jl/dev/" target="_blank"><strong>DocumenterVitepress.jl</strong></a><br>', | ||
copyright: `© Copyright ${new Date().getUTCFullYear()}.` | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// .vitepress/theme/index.ts | ||
import { h } from 'vue' | ||
import type { Theme } from 'vitepress' | ||
import DefaultTheme from 'vitepress/theme' | ||
|
||
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client' | ||
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 }) { | ||
enhanceAppWithTabs(app) | ||
} | ||
} satisfies Theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
@import url(https://fonts.googleapis.com/css?family=Space+Mono:regular,italic,700,700italic); | ||
@import url(https://fonts.googleapis.com/css?family=Space+Grotesk:regular,italic,700,700italic); | ||
|
||
/* Customize default theme styling by overriding CSS variables: | ||
https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css | ||
*/ | ||
|
||
/* Layouts */ | ||
|
||
/* | ||
:root { | ||
--vp-layout-max-width: 1440px; | ||
} */ | ||
|
||
.VPHero .clip { | ||
white-space: pre; | ||
max-width: 500px; | ||
} | ||
|
||
/* Fonts */ | ||
|
||
:root { | ||
/* Typography */ | ||
--vp-font-family-base: "Barlow", "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: "Fira Code", Menlo, Monaco, Consolas, "Courier New", | ||
monospace; | ||
} | ||
|
||
/* Colors */ | ||
/* more colors ansi colors = [209, 32, 81, 204, 249, 166, 37] */ | ||
/* more colors colors = ["#ff875f", "#0087d7", "#5fd7ff", "#ff5f87", "#b2b2b2", "#d75f00", "#00afaf"] */ | ||
:root { | ||
--julia-blue: #5fd7ff ; | ||
--julia-purple: #5fd7ff; | ||
--julia-red: #CB3C33; | ||
--julia-green: #0087d7; | ||
|
||
--vp-c-brand: #0087d7; | ||
--vp-c-brand-light: #0087d7; | ||
--vp-c-brand-lighter: #5fd7ff ; | ||
--vp-c-brand-lightest: #5fd7ff ; | ||
--vp-c-brand-dark: #5fd7ff; | ||
--vp-c-brand-darker: #5fd7ff ; | ||
--vp-c-brand-dimm: #212425; | ||
} | ||
|
||
/* Component: Button */ | ||
|
||
:root { | ||
--vp-button-brand-border: var(--vp-c-brand-light); | ||
--vp-button-brand-text: var(--vp-c-white); | ||
--vp-button-brand-bg: var(--vp-c-brand); | ||
--vp-button-brand-hover-border: var(--vp-c-brand-light); | ||
--vp-button-brand-hover-text: var(--vp-c-white); | ||
--vp-button-brand-hover-bg: var(--vp-c-brand-light); | ||
--vp-button-brand-active-border: var(--vp-c-brand-light); | ||
--vp-button-brand-active-text: var(--vp-c-white); | ||
--vp-button-brand-active-bg: var(--vp-button-brand-bg); | ||
} | ||
|
||
/* Component: Home */ | ||
|
||
:root { | ||
--vp-home-hero-name-color: transparent; | ||
--vp-home-hero-name-background: -webkit-linear-gradient( | ||
120deg, | ||
#ff875f 30%, | ||
#ff875f 30% | ||
); | ||
|
||
--vp-home-hero-image-background-image: linear-gradient( | ||
-45deg, | ||
#0094ea11 15%, | ||
#0094ea11 15%, | ||
#0094ea11 | ||
); | ||
--vp-home-hero-image-filter: blur(10px); | ||
} | ||
|
||
@media (min-width: 640px) { | ||
:root { | ||
--vp-home-hero-image-filter: blur(60px); | ||
} | ||
} | ||
|
||
@media (min-width: 960px) { | ||
:root { | ||
--vp-home-hero-image-filter: blur(72px); | ||
} | ||
} | ||
|
||
/* Component: Custom Block */ | ||
|
||
:root.dark { | ||
--vp-custom-block-tip-border: var(--vp-c-brand); | ||
--vp-custom-block-tip-text: var(--vp-c-brand-lightest); | ||
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm); | ||
|
||
/* // Tweak the color palette for blacks and dark grays */ | ||
--vp-c-black: hsl(220 20% 9%); | ||
--vp-c-black-pure: hsl(220, 24%, 4%); | ||
--vp-c-black-soft: hsl(220 16% 13%); | ||
--vp-c-black-mute: hsl(220 14% 17%); | ||
--vp-c-gray: hsl(220 8% 56%); | ||
--vp-c-gray-dark-1: hsl(220 10% 39%); | ||
--vp-c-gray-dark-2: hsl(220 12% 28%); | ||
--vp-c-gray-dark-3: hsl(220 12% 23%); | ||
--vp-c-gray-dark-4: hsl(220 14% 17%); | ||
--vp-c-gray-dark-5: hsl(220 16% 13%); | ||
|
||
/* // Backgrounds */ | ||
--vp-c-bg: hsl(240, 2%, 11%); | ||
--vp-custom-block-info-bg: hsl(220 14% 17%); | ||
--vp-c-gutter: hsl(220 20% 9%); | ||
|
||
--vp-c-bg-alt: hsl(220 20% 9%); | ||
--vp-c-bg-soft: hsl(220 14% 17%); | ||
--vp-c-bg-mute: hsl(220 12% 23%); | ||
|
||
} | ||
|
||
/* Component: Algolia */ | ||
|
||
.DocSearch { | ||
--docsearch-primary-color: var(--vp-c-brand) !important; | ||
} | ||
|
||
/* Component: MathJax */ | ||
|
||
/* mjx-container > svg { | ||
display: block; | ||
margin: auto; | ||
} | ||
mjx-container { | ||
padding: 0.5rem 0; | ||
} | ||
mjx-container { | ||
display: inline-block; | ||
margin: auto 2px -2px; | ||
} | ||
mjx-container > svg { | ||
margin: auto; | ||
display: inline-block; | ||
} */ | ||
|
||
/** | ||
* Colors links | ||
* -------------------------------------------------------------------------- */ | ||
|
||
:root { | ||
--vp-c-brand-1: #ff875f; | ||
--vp-c-brand-2: #ff875f; | ||
--vp-c-brand-3: #ff875f; | ||
--vp-c-sponsor: #ca2971; | ||
--vitest-c-sponsor-hover: #c13071; | ||
} | ||
|
||
.dark { | ||
--vp-c-brand-1: #0087d7; | ||
--vp-c-brand-2: #0087d7; | ||
--vp-c-brand-3: #0087d7; | ||
--vp-c-sponsor: #ee4e95; | ||
--vitest-c-sponsor-hover: #e51370; | ||
} |
Oops, something went wrong.