-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8816 from wmontwe/change-mdbook-setup
Change mdbook setup
- Loading branch information
Showing
26 changed files
with
2,796 additions
and
1,746 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Deploy docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'docs/**' | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.toml | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install mdbook and extensions | ||
run: ./docs/install.sh | ||
|
||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | ||
|
||
- name: Build docs | ||
run: mdbook build docs --dest-dir=book/docs/latest | ||
|
||
- name: Test docs | ||
run: mdbook test docs | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | ||
with: | ||
path: ./book/docs | ||
|
||
deploy-docs: | ||
environment: | ||
name: pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build-docs | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |
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 |
---|---|---|
|
@@ -5,6 +5,9 @@ local.properties | |
# Kotlin | ||
.kotlin/ | ||
|
||
# mdBook | ||
book/ | ||
|
||
# Generated folders | ||
bin/ | ||
build/ | ||
|
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,3 @@ | ||
# About Thunderbird for Android | ||
|
||
This document provides an overview of the Thunderbird for Android project. |
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
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,16 +1,26 @@ | ||
# Summary | ||
|
||
[Thunderbird for Android](README.md) | ||
|
||
--- | ||
|
||
- [Contributing](CONTRIBUTING.md) | ||
- [Design](DESIGN.md) | ||
- [Releasing](RELEASING.md) | ||
- [Translations](translations.md) | ||
- [Java to Kotlin Conversion Guide](contributing/java-to-kotlin-conversion-guide.md) | ||
- [Architecture Decision Records](architecture/adr/README.md) | ||
- [0001 - Switch From Java to Kotlin](architecture/adr/0001-switch-from-java-to-kotlin.md) | ||
- [0002 - UI - Wrap Material Components in Atomic Design System](architecture/adr/0002-ui-wrap-material-components-in-atomic-design-system.md) | ||
- [0003 - Test - Switch Test Assertions From Truth to Assertk](architecture/adr/0003-switch-test-assertions-from-truth-to-assertk.md) | ||
- [0004 - Naming Conventions for Interfaces and Their Implementations](architecture/adr/0004-naming-conventions-for-interfaces-and-their-implementations.md) | ||
- [0005 - Central Project Configuration](architecture/adr/0005-central-project-configuration.md) | ||
- [0006 - White Label Architecture](architecture/adr/0006-white-label-architecture.md) | ||
- [0007 - Project Structure](architecture/adr/0007-project-structure.md) | ||
- [Add Documentation](add-documentation.md) | ||
- [Accepted]() | ||
- [0001 - Switch From Java to Kotlin](architecture/adr/0001-switch-from-java-to-kotlin.md) | ||
- [0002 - UI - Wrap Material Components in Atomic Design System](architecture/adr/0002-ui-wrap-material-components-in-atomic-design-system.md) | ||
- [0003 - Test - Switch Test Assertions From Truth to Assertk](architecture/adr/0003-switch-test-assertions-from-truth-to-assertk.md) | ||
- [0004 - Naming Conventions for Interfaces and Their Implementations](architecture/adr/0004-naming-conventions-for-interfaces-and-their-implementations.md) | ||
- [0005 - Central Project Configuration](architecture/adr/0005-central-project-configuration.md) | ||
- [0006 - White Label Architecture](architecture/adr/0006-white-label-architecture.md) | ||
- [0007 - Project Structure](architecture/adr/0007-project-structure.md) | ||
- [Proposed]() | ||
- [Rejected]() | ||
|
||
--- | ||
|
||
[How to Document](how-to-document.md) |
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
footer { | ||
font-size: 0.8em; | ||
text-align: center; | ||
border-top: 1px solid var(--fg); | ||
padding: 5px 0; | ||
} |
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,35 @@ | ||
(() => { | ||
const darkThemes = ['ayu', 'navy', 'coal']; | ||
const lightThemes = ['light', 'rust']; | ||
|
||
const classList = document.getElementsByTagName('html')[0].classList; | ||
|
||
let lastThemeWasLight = true; | ||
for (const cssClass of classList) { | ||
if (darkThemes.includes(cssClass)) { | ||
lastThemeWasLight = false; | ||
break; | ||
} | ||
} | ||
|
||
const theme = lastThemeWasLight ? 'default' : 'dark'; | ||
mermaid.initialize({ startOnLoad: true, theme }); | ||
|
||
// Simplest way to make mermaid re-render the diagrams in the new theme is via refreshing the page | ||
|
||
for (const darkTheme of darkThemes) { | ||
document.getElementById(darkTheme).addEventListener('click', () => { | ||
if (lastThemeWasLight) { | ||
window.location.reload(); | ||
} | ||
}); | ||
} | ||
|
||
for (const lightTheme of lightThemes) { | ||
document.getElementById(lightTheme).addEventListener('click', () => { | ||
if (!lastThemeWasLight) { | ||
window.location.reload(); | ||
} | ||
}); | ||
} | ||
})(); |
Large diffs are not rendered by default.
Oops, something went wrong.
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,14 @@ | ||
.sidebar-scrollbox .section a[href*="adr"] strong { | ||
display: none; | ||
} | ||
|
||
.sidebar-scrollbox .section a[href*="adr"] .number { | ||
font-weight: 550; | ||
} | ||
|
||
.chapter li .chapter-item div { | ||
display: block; | ||
padding: 0; | ||
text-decoration: none; | ||
color: var(--sidebar-fg); | ||
} |
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,18 @@ | ||
document.querySelectorAll('.sidebar-scrollbox .section a[href*="adr"]').forEach(el => { | ||
let textNodes = [...el.childNodes].filter(node => node.nodeType === Node.TEXT_NODE && node.nodeValue.trim().length > 0); | ||
|
||
if (textNodes.length > 0) { | ||
let textNode = textNodes[0]; // First text node (ignoring elements like <strong>) | ||
let text = textNode.nodeValue.trim(); | ||
|
||
if (text.length >= 4) { | ||
let span = document.createElement("span"); | ||
span.classList.add("number"); | ||
span.textContent = text.substring(0, 4); | ||
|
||
textNode.nodeValue = text.substring(4); // Remove first 4 chars from original text node | ||
|
||
el.insertBefore(span, textNode); // Insert the styled first 4 characters before the rest | ||
} | ||
} | ||
}); |
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,61 @@ | ||
a[class^='pagetoc-H']:only-child { | ||
display: none; | ||
} | ||
|
||
@media only screen and (max-width:1439px) { | ||
.sidetoc { | ||
display: none; | ||
} | ||
} | ||
|
||
@media only screen and (min-width:1440px) { | ||
main { | ||
position: relative; | ||
} | ||
.sidetoc { | ||
margin-left: auto; | ||
margin-right: auto; | ||
left: calc(100% + (var(--content-max-width))/4 - 140px); | ||
position: absolute; | ||
} | ||
.pagetoc { | ||
position: fixed; | ||
width: 200px; | ||
height: calc(100vh - var(--menu-bar-height) - 0.67em * 4); | ||
overflow: auto; | ||
} | ||
.pagetoc a { | ||
border-left: 1px solid var(--sidebar-bg); | ||
color: var(--fg) !important; | ||
display: block; | ||
padding-bottom: 5px; | ||
padding-top: 5px; | ||
padding-left: 10px; | ||
text-align: left; | ||
text-decoration: none; | ||
} | ||
.pagetoc a:hover, | ||
.pagetoc a.active { | ||
background: var(--sidebar-bg); | ||
color: var(--sidebar-fg) !important; | ||
} | ||
.pagetoc .active { | ||
background: var(--sidebar-bg); | ||
color: var(--sidebar-fg); | ||
} | ||
.pagetoc .pagetoc-H2 { | ||
padding-left: 20px; | ||
} | ||
.pagetoc .pagetoc-H3 { | ||
padding-left: 40px; | ||
} | ||
.pagetoc .pagetoc-H4 { | ||
padding-left: 60px; | ||
} | ||
.pagetoc .pagetoc-H5 { | ||
display: none; | ||
} | ||
.pagetoc .pagetoc-H6 { | ||
display: none; | ||
} | ||
} |
Oops, something went wrong.