File tree Expand file tree Collapse file tree 5 files changed +142
-0
lines changed Expand file tree Collapse file tree 5 files changed +142
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Documentation
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+
9+ jobs :
10+ docs :
11+ name : Update documentation
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v2
17+
18+ - name : Fetch tags
19+ run : git fetch --prune --unshallow
20+
21+ - name : Set up Python
22+ uses : actions/setup-python@v2
23+ with :
24+ python-version : 3.6
25+
26+ - name : Install Python dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install mkdocs mkdocs-material mike
30+
31+ - uses : actions/setup-java@v2
32+ with :
33+ java-version : 11
34+ distribution : ' adopt'
35+
36+ - name : Get current Readium version
37+ run : echo "READIUM_VERSION=`git describe --tag --match [0-9]* --abbrev=0`" >> $GITHUB_ENV
38+
39+ - name : Run Dokka
40+ run : ./gradlew dokkaGfmMultiModule
41+
42+ - name : Run MkDocs
43+ run : |
44+ git config --global user.name "${GITHUB_ACTOR}"
45+ git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
46+ mike deploy ${{ env.READIUM_VERSION }}
47+ mike set-default ${{ env.READIUM_VERSION }}
48+ mike deploy --rebase --push --update-aliases ${{ env.READIUM_VERSION }} latest
Original file line number Diff line number Diff line change @@ -77,3 +77,6 @@ lint/reports/
7777
7878# Android Profiling
7979* .hprof
80+
81+ # Docs
82+ docs /readium
Original file line number Diff line number Diff line change 66
77buildscript {
88 ext. kotlin_version = ' 1.5.31'
9+ ext. dokka_version = ' 1.5.30'
910
1011 repositories {
1112 google()
@@ -18,9 +19,12 @@ buildscript {
1819 dependencies {
1920 classpath ' com.android.tools.build:gradle:7.0.3'
2021 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
22+ classpath " org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version "
2123 }
2224}
2325
26+ apply plugin : ' org.jetbrains.dokka'
27+
2428allprojects {
2529 repositories {
2630 google()
@@ -32,6 +36,28 @@ allprojects {
3236 }
3337}
3438
39+ subprojects { project ->
40+ if (project. name == ' test-app' || project. name == ' readium' ) return
41+ apply plugin : ' org.jetbrains.dokka'
42+ tasks. named(" dokkaGfmPartial" ) {
43+ dokkaSourceSets {
44+ configureEach {
45+ reportUndocumented. set(false )
46+ skipEmptyPackages. set(false )
47+ skipDeprecated. set(true )
48+ }
49+ }
50+ }
51+ }
52+
3553task clean (type : Delete ) {
3654 delete rootProject. buildDir
3755}
56+
57+ task cleanDocs (type : Delete ) {
58+ delete " ${ project.rootDir} /docs/readium" , " ${ project.rootDir} /docs/index.md"
59+ }
60+
61+ tasks. dokkaGfmMultiModule. configure {
62+ outputDirectory = new File (" ${ project.rootDir} /docs" )
63+ }
Original file line number Diff line number Diff line change 1+ body {
2+ --md-primary-fg-color : # 449d44 ;
3+ --md-primary-fg-color--light : # 73b02c ;
4+ --md-primary-fg-color--dark : # 255625 ;
5+ --md-accent-fg-color : # 73b02c ;
6+ }
Original file line number Diff line number Diff line change 1+ site_name : Readium Kotlin
2+
3+ # Meta tags (placed in header)
4+ site_description : Readium Mobile is a toolkit for ebooks, audiobooks and comics written in Swift & Kotlin.
5+ site_author : Readium Foundation
6+ site_url : https://github.com/readium/kotlin-toolkit
7+
8+ # Repository (add link to repository on each page)
9+ repo_name : kotlin-toolkit
10+ repo_url : https://github.com/readium/kotlin-toolkit
11+
12+ # Copyright (shown at the footer)
13+ copyright : ' Copyright © 2021 Readium Foundation'
14+
15+ # Material theme
16+ theme :
17+ name : ' material'
18+ # favicon: favicon.svg
19+ social :
20+ - type : ' github'
21+ link : ' https://github.com/readium/kotlin-toolkit'
22+
23+ # Extensions
24+ markdown_extensions :
25+ - admonition
26+ - codehilite :
27+ guess_lang : false
28+ - footnotes
29+ - meta
30+ - def_list
31+ - toc :
32+ permalink : true
33+ # - pymdownx.betterem:
34+ # smart_enable: all
35+ # - pymdownx.caret
36+ # - pymdownx.inlinehilite
37+ # - pymdownx.magiclink
38+ # - pymdownx.smartsymbols
39+ # - pymdownx.superfences
40+
41+ # Dev server binding
42+ # dev_addr: 127.0.0.1:3001
43+
44+ nav :
45+ - Migration Guide : migration-guide.md
46+ - API Reference :
47+ - Shared : readium/shared/index.md
48+ - Streamer : readium/streamer/index.md
49+ - Navigator : readium/navigator/index.md
50+ - OPDS : readium/opds/index.md
51+ - LCP : readium/lcp/index.md
52+
53+ extra_css :
54+ - readium_colors.css
55+
56+ extra :
57+ version :
58+ provider : mike
59+
You can’t perform that action at this time.
0 commit comments