Skip to content

Commit

Permalink
Use mkdocs-mateiral
Browse files Browse the repository at this point in the history
  • Loading branch information
RealOrangeOne committed Feb 13, 2024
1 parent 011331e commit 6042a08
Show file tree
Hide file tree
Showing 25 changed files with 288 additions and 50 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: CI

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

# Allow running manually
workflow_dispatch:

permissions:
contents: read
Expand All @@ -11,23 +18,36 @@ concurrency:
group: "pages"
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Run Hugo
uses: crazy-max/ghaction-hugo@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
version: latest
extended: true
args: --minify --verbose
python-version: '3.11'
cache: 'pip'

- run: pip install -r requirements.txt

- name: Setup Pages
uses: actions/configure-pages@v1

- name: Build
run: |
mkdocs build -v
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
path: ./site

deploy:
environment:
Expand Down
187 changes: 171 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,176 @@
# Created by https://www.toptal.com/developers/gitignore/api/hugo
# Edit at https://www.toptal.com/developers/gitignore?templates=hugo
# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python

### Hugo ###
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux
# C extensions
*.so

# Temporary lock file while building
/.hugo_build.lock
# 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

# End of https://www.toptal.com/developers/gitignore/api/hugo
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

/resources
# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml

# ruff
.ruff_cache/

# LSP config files
pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/python
9 changes: 0 additions & 9 deletions config.yml

This file was deleted.

1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Notes
Empty file added docs/colophon.md
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ FROM pg_stat_activity
WHERE (now() - pg_stat_activity.query_start) > interval '5 minutes';
```

Also see [running queries](../running-queries).
Also see [running queries](./running-queries.md).

# Stopping a given connection

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion content/example-note.md → docs/notes/example-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ modified: 2022-09-09

This is an example note, see below for some code.

```js
```javascript
{
resolve: 'gatsby-theme-code-notes',
options: {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tags
5 changes: 0 additions & 5 deletions go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions go.sum

This file was deleted.

9 changes: 0 additions & 9 deletions justfile

This file was deleted.

80 changes: 80 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
site_name: Notes
repo_url: https://github.com/RealOrangeOne/notes
repo_name: RealOrangeOne/notes

extra:
social:
- icon: fontawesome/solid/globe
link: https://theorangeone.net

theme:
name: material
features:
- navigation.top
- navigation.sections
- navigation.index
icon:
logo: fontawesome/regular/note-sticky
favicon: https://theorangeone.net/favicon.ico
palette:
# Palette toggle for light mode
- scheme: default
primary: deep orange
accent: orange
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- scheme: slate
primary: deep orange
accent: orange
toggle:
icon: material/brightness-4
name: Switch to light mode


# Extensions
markdown_extensions:
- attr_list
- abbr
- pymdownx.highlight
- pymdownx.superfences
- footnotes
- markdown.extensions.admonition
- markdown.extensions.def_list
- markdown.extensions.toc:
permalink: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.progressbar
- pymdownx.smartsymbols
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
- mdx_include:
base_path: docs


plugins:
- search
- awesome-pages
- glightbox
- tags:
enabled: true
tags_file: tags.md
- git-revision-date-localized:
enable_creation_date: true
fallback_to_build_date: true
exclude:
- tags.md
- README.md
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdocs
mkdocs-material
mdx-include
mkdocs-awesome-pages-plugin
mkdocs-glightbox
mkdocs-git-revision-date-localized-plugin

0 comments on commit 6042a08

Please sign in to comment.