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
53 changes: 53 additions & 0 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Documenter

on:
push:
branches:
- main
tags: ['*']
pull_request:
workflow_dispatch:

permissions:
contents: write
pages: write
id-token: write
statuses: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Julia
uses: julia-actions/setup-julia@v1
with:
version: '1.10'

- name: Load Julia packages from cache
id: julia-cache
uses: julia-actions/cache@v2

- name: Build and deploy docs
uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
GKSwstype: "100"
JULIA_DEBUG: "Documenter"
DATADEPS_ALWAYS_ACCEPT: true

- name: Save Julia depot cache on cancel or failure
id: julia-cache-save
if: cancelled() || failure()
uses: actions/cache/save@v4
with:
path: |
${{ steps.julia-cache.outputs.cache-paths }}
key: ${{ steps.julia-cache.outputs.cache-key }}
31 changes: 31 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
51 changes: 0 additions & 51 deletions .github/workflows/documentation.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/label.yml

This file was deleted.

2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
ColorTypes = ">=0.11.4"
DataTypesBasic = ">=2.0.3"
Dictionaries = ">=0.3.25"
Documenter = "1"
DocumenterVitepress = "0.0.19, 0.0.20"
FreeType = ">=4.1.0"
FreeTypeAbstraction = ">=0.10.0"
GLFW = ">=3.4.1"
Expand Down
4 changes: 0 additions & 4 deletions docs/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
Rocket = "df971d30-c9d6-4b37-b8ff-e965b2cb3a40"
56 changes: 25 additions & 31 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
using Pkg
Pkg.add([
"Documenter",
"DocumenterVitepress",
"Rocket"
])
using MedEye3d
using Rocket
using Documenter
using DocumenterVitepress
using Documenter, DocumenterVitepress


DocMeta.setdocmeta!(MedEye3d, :DocTestSetup, :(using MedEye3d); recursive=true)

makedocs(;
modules=[MedEye3d, MedEye3d.SegmentationDisplay, MedEye3d.ReactingToInput, MedEye3d.ReactOnKeyboard, MedEye3d.ReactOnMouseClickAndDrag, MedEye3d.ReactToScroll, MedEye3d.PrepareWindow, MedEye3d.TextureManag, MedEye3d.DisplayWords, MedEye3d.Uniforms, MedEye3d.ShadersAndVerticiesForText, MedEye3d.ShadersAndVerticies, MedEye3d.OpenGLDisplayUtils, MedEye3d.CustomFragShad, MedEye3d.PrepareWindowHelpers, MedEye3d.StructsManag, MedEye3d.ForDisplayStructs, MedEye3d.DataStructs, MedEye3d.BasicStructs, MedEye3d.ModernGlUtil
# ,MedEye3d.MaskDiffrence
, MedEye3d.KeyboardVisibility, MedEye3d.OtherKeyboardActions, MedEye3d.KeyboardMouseHelper, MedEye3d.WindowControll, MedEye3d.ChangePlane],
repo=Remotes.GitHub("JuliaHealth", "MedEye3d.jl"),
authors="Jakub-Mitura <jakubmitura14@gmail.com>, Divyansh-Goyal <divital2004@gmail.com> and contributors",
sitename="MedEye3d.jl",
makedocs(;
sitename = "MedEye3d.jl",
authors = "Jakub Mitura <jakub.mitura14@gmail>, Beata E. Chrapko and Divyansh Goyal <divital2004@gmail.com>",
format=DocumenterVitepress.MarkdownVitepress(
repo="https://github.com/JuliaHealth/MedEye3d.jl",
repo = "github.com/JuliaHealth/MedEye3d.jl",
devbranch = "master",
devurl = "dev",
),
warnonly = true,
draft = false,
source = "src",
build = "build",
pages=[
"Home" => "index.md",
"Tutorials" => "tutorials.md",
"Contributing" => "contributing.md"
],
"Manual" => [
"Get Started" => "manual/get_started.md",
"Code" => "manual/code_example.md"
],
"Developers' documentation" => [
"Visualization Playbook" => "devs/playbook.md"
],
"api" => "api.md"
],
)

deploydocs(;
repo="github.com/JuliaHealth/MedEye3d.jl",
target="build", # this is where Vitepress stores its output
devbranch="master",
branch="gh-pages",
push_preview=true
# This is the critical part that creates the version structure
DocumenterVitepress.deploydocs(;
repo = "github.com/JuliaHealth/MedImages.jl",
devbranch = "master",
push_preview = true,
)
14 changes: 6 additions & 8 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"devDependencies": {
"markdown-it": "^14.1.0",
"markdown-it-mathjax3": "^4.3.2",
"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"
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.14.0",
"markdown-it": "^14.1.0",
"markdown-it-footnote": "^4.0.0",
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.6.3",
"vitepress-plugin-tabs": "^0.6.0"
}
}
98 changes: 98 additions & 0 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import { defineConfig } from 'vitepress'
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import mathjax3 from "markdown-it-mathjax3";
import footnote from "markdown-it-footnote";
import path from 'path'

function getBaseRepository(base: string): string {
if (!base || base === '/') return '/';
const parts = base.split('/').filter(Boolean);
return parts.length > 0 ? `/${parts[0]}/` : '/';
}

const baseTemp = {
base: 'REPLACE_ME_DOCUMENTER_VITEPRESS',// TODO: replace this in makedocs!
}

const navTemp = {
nav: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
}

const nav = [
...navTemp.nav,
{
component: 'VersionPicker'
}
]

// 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',
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' }],
['script', {src: `${getBaseRepository(baseTemp.base)}versions.js`}],
// ['script', {src: '/versions.js'], for custom domains, I guess if deploy_url is available.
['script', {src: `${baseTemp.base}siteinfo.js`}]
],

vite: {
define: {
__DEPLOY_ABSPATH__: JSON.stringify('REPLACE_ME_DOCUMENTER_VITEPRESS_DEPLOY_ABSPATH'),
},
resolve: {
alias: {
'@': path.resolve(__dirname, '../components')
}
},
optimizeDeps: {
exclude: [
'@nolebase/vitepress-plugin-enhanced-readabilities/client',
'vitepress',
'@nolebase/ui',
],
},
ssr: {
noExternal: [
// If there are other packages that need to be processed by Vite, you can add them here.
'@nolebase/vitepress-plugin-enhanced-readabilities',
'@nolebase/ui',
],
},
},
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',
search: {
provider: 'local',
options: {
detailedView: true
}
},
nav,
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()}.`
}
}
})
Loading
Loading