-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4393be4
Showing
15 changed files
with
1,067 additions
and
0 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,60 @@ | ||
# Builds and deploys docs to GitHub Pages | ||
name: Publish Docs | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run | ||
# in-progress and latest queued. However, do NOT cancel in-progress runs in order | ||
# to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
env: | ||
source-dir: examples/mkdocs # The directory containing the MkDocs configuration file | ||
output-dir: site # The directory containing the generated site | ||
|
||
jobs: | ||
# Build docs with MkDocs | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install --upgrade mkdocs-walt | ||
- name: Build with MkDocs | ||
working-directory: ${{ env.source-dir }} | ||
run: mkdocs build -d ${{ env.output-dir }} --verbose --clean --strict | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ${{ env.source-dir }}/${{ env.output-dir }} | ||
|
||
# Deployment to GitHub Pages | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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,72 @@ | ||
# MacOS | ||
**/.DS_Store | ||
|
||
# IDEs | ||
.idea/* | ||
.vscode/* | ||
|
||
# Virtual environments | ||
.venv/* | ||
env/* | ||
**/env | ||
**/venv | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# mkdocs documentation | ||
**/site/ | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
**/*.py[cod] | ||
**/*$py.class | ||
|
||
# C extensions | ||
**/*.so |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Suzen Fylke | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,76 @@ | ||
# walt: a minimal documentation theme | ||
|
||
[![GitHub][github_badge]][github_link] | ||
[![PyPI][pypi_badge]][pypi_link] | ||
|
||
[github_badge]: https://badgen.net/badge/icon/GitHub?icon=github&color=black&label | ||
[github_link]: https://github.com/codesue/walt | ||
|
||
[pypi_badge]: https://badgen.net/pypi/v/mkdocs-walt?icon=pypi&color=black&label | ||
[pypi_link]: https://pypi.org/project/mkdocs-walt | ||
|
||
Walt is a minimal documentation theme that is best suited for single page websites. | ||
|
||
## MkDocs theme | ||
|
||
Walt is available as an MkDocs theme. See [mkdocs-walt](mkdocs-walt) to learn how | ||
to install and use `mkdocs-walt` in your MkDocs projects. | ||
|
||
### Developing mkdocs-walt | ||
|
||
#### Installing from source | ||
|
||
```sh | ||
git clone https://github.com/codesue/walt.git | ||
cd walt/mkdocs-walt | ||
pip install -e . | ||
``` | ||
|
||
#### Running the example | ||
|
||
``` | ||
cd ../examples/mkdocs # if your current working directory is walt/mkdocs-walt | ||
mkdocs serve | ||
``` | ||
|
||
#### Building and distributing the package | ||
|
||
1. Install the necessary packages: | ||
|
||
```sh | ||
pip install "clementine[rind]" | ||
``` | ||
|
||
2. Build the package and verify the build: | ||
|
||
```sh | ||
python -m build | ||
twine check dist/* | ||
``` | ||
|
||
3. Upload the package to TestPyPI: | ||
|
||
```sh | ||
twine upload -r testpypi dist/* | ||
``` | ||
|
||
Install the package from TestPYPI in a clean virtual environment and confirm | ||
that the example runs as expected: | ||
|
||
```sh | ||
pip install -i https://test.pypi.org/simple/ mkdocs-walt | ||
``` | ||
|
||
4. Upload the package to PyPI: | ||
|
||
```sh | ||
twine upload dist/* | ||
``` | ||
|
||
## Acknowledgements | ||
|
||
Walt uses [writ.css](https://github.com/programble/writ/tree/master) for styles | ||
and examples use [writ's reference html page](https://github.com/programble/writ/blob/master/reference.html). | ||
|
||
Walt also uses [Catppuccin](https://github.com/catppuccin/catppuccin) for code | ||
block syntax highlighting and dark mode color palettes. |
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 @@ | ||
# About | ||
|
||
🍃 Walt is a minimal documentation theme best suited for single page websites | ||
|
||
## MkDocs theme | ||
|
||
Walt is available as an MkDocs theme that features: | ||
|
||
- classless styles for semantic HTML based on [writ.css](https://writ.cmcenroe.me) | ||
- light mode and dark mode based on system settings | ||
- an emoji favicon for browsers that support svg site icons | ||
- code syntax highlighting using highlight.js | ||
|
||
### Installation | ||
|
||
Installing with pip: | ||
|
||
```sh | ||
pip install mkdocs-walt | ||
``` | ||
|
||
### Usage | ||
|
||
Create a new MkDocs project with the `mkdocs` CLI and add the following your | ||
project's `mkdocs.yml`: | ||
|
||
```yaml | ||
theme: | ||
name: walt | ||
``` | ||
|
||
### Defaults | ||
|
||
Walt sets the following configurations by default: | ||
|
||
```yaml | ||
site_emoji: 🍃 | ||
locale: en | ||
theme_color: "hsl(0, 0%, 100%)" | ||
theme_color_dark: "hsl(232, 23%, 18%)" | ||
include_header: true | ||
highlightjs: true | ||
``` | ||
|
||
## Acknowledgements | ||
|
||
Walt uses [writ.css](https://github.com/programble/writ/tree/master) for styles | ||
and [Catppuccin](https://github.com/catppuccin/catppuccin) for code block syntax | ||
highlighting and dark mode color palettes. |
Oops, something went wrong.