Skip to content

Commit 93b60d6

Browse files
committed
feat: aling docs generation with template
1 parent fc7078c commit 93b60d6

File tree

9 files changed

+78
-52
lines changed

9 files changed

+78
-52
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929
restore-keys: |
3030
mkdocs-material-
3131
- run: |
32-
./gradlew dokkaHtmlMultiModule
33-
mv build/dokka/htmlMultiModule docs/api
32+
chmod +x ./generate_docs.sh
33+
./generate_docs.sh
34+
3435
- run: pip install mkdocs-material
3536
- run: mkdocs gh-deploy --force

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
.cxx
1515
local.properties
1616
/build-logic/convention/build/
17+
18+
# generated dokka files just, ignored just in case
19+
/docs/api/

docs/assets/favicon.ico

1.28 KB
Binary file not shown.

docs/assets/logo.png

12 KB
Loading

docs/changelog.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/index.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/stylesheets/extra.css

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,44 @@
11
:root {
2-
--md-primary-fg-color: #FFFF00;
3-
--md-primary-fg-color--light: #464A4D;
4-
--md-primary-fg-color--dark: #464A4D;
5-
--md-primary-bg-color: #464A4D;
6-
--md-primary-bg-color--light: #464A4D;
7-
8-
// Accent color shades
9-
--md-accent-fg-color: #000000;
10-
--md-accent-fg-color--transparent: #464A4D;
11-
--md-accent-bg-color: #464A4D;
12-
--md-accent-bg-color--light: #464A4D;
13-
}
142

3+
/* Primary color shades - NavBar */
4+
--md-primary-fg-color: yellow;
5+
--md-primary-bg-color: black;
156

16-
:root>* {
17-
--md-typeset-a-color: #656A6D;
7+
/* Accent color shades - Hover effects */
8+
--md-accent-fg-color: yellow;
9+
--md-accent-fg-color--transparent: white;
10+
--md-accent-bg-color: white;
1811
}
12+
13+
:root > * {
14+
/* background color */
15+
--md-default-bg-color: #343434;
16+
17+
/* default text color */
18+
--md-typeset-color: white;
19+
20+
21+
--md-footer-fg-color: yellow;
22+
--md-footer-bg-color: black;
23+
24+
/* color for markdown code blocks */
25+
--md-code-fg-color: yellow;
26+
--md-code-bg-color: #2B2B2B;
27+
28+
/* color for markdown headers */
29+
--md-default-fg-color--light: white;
30+
31+
/* color for code highlighting, works kinda like Dracula Theme */
32+
--md-code-hl-number-color: #A9B7C5;
33+
--md-code-hl-special-color: #A9B7C5;
34+
--md-code-hl-function-color: #A9B7C5;
35+
--md-code-hl-constant-color: #A9B7C5;
36+
--md-code-hl-keyword-color: #CB7832;
37+
--md-code-hl-string-color: #6A8759;
38+
--md-code-hl-name-color: #A9B7C5;
39+
--md-code-hl-operator-color: #A9B7C5;
40+
--md-code-hl-punctuation-color: #A9B7C5;
41+
--md-code-hl-comment-color: #6A8759;
42+
--md-code-hl-generic-color: #A9B7C5;
43+
--md-code-hl-variable-color: #A9B7C5;
44+
}

generate_docs.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
# Copy the README.md And CHANGELOG.md to their respective tabs in MKDocs
3+
cp README.md docs/index.md
4+
cp CHANGELOG.md docs/changelog.md
5+
6+
# Generate Dokka documentation for the project
7+
./gradlew dokkaHtmlMultiModule
8+
mv build/dokka/htmlMultiModule docs/api

mkdocs.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
1-
site_name: My Docs
1+
site_name: Mosaic
2+
repo_url: https://github.com/monstar-lab-oss/android-mosaic
3+
4+
25
extra_css:
36
- stylesheets/extra.css
47
theme:
8+
logo: assets/logo.png
9+
favicon: assets/favicon.ico
10+
11+
features:
12+
- navigation.instant
13+
- navigation.instant.prefetch
14+
- navigation.path
15+
- navigation.sections
16+
- navigation.sections.expand
517
name: material
618
palette:
719
primary: custom
20+
accent: custom
821

922
nav:
1023
- 'API': api/
24+
- 'Changelog': changelog.md
25+
26+
markdown_extensions:
27+
- pymdownx.highlight:
28+
anchor_linenums: true
29+
line_spans: __span
30+
pygments_lang_class: true
31+
- pymdownx.inlinehilite
32+
- pymdownx.snippets
33+
- pymdownx.superfences

0 commit comments

Comments
 (0)