1
Fork 0
mirror of https://github.com/RealOrangeOne/notes.git synced 2024-12-21 16:35:59 +00:00

Use mkdocs-mateiral

This commit is contained in:
Jake Howard 2024-02-13 23:16:21 +00:00 committed by Jake Howard
parent 011331ee0c
commit 93a375b482
25 changed files with 288 additions and 50 deletions

View file

@ -1,6 +1,13 @@
name: CI
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
# Allow running manually
workflow_dispatch:
permissions:
contents: read
@ -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:

187
.gitignore vendored
View file

@ -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

View file

@ -1,9 +0,0 @@
baseURL: https://notes.theorangeone.net
title: Notes
enableGitInfo: true
cleanDestinationDir: true
module:
imports:
- path: github.com/RealOrangeOne/hugo-theme-notes

1
docs/README.md Normal file
View file

@ -0,0 +1 @@
# Notes

0
docs/colophon.md Normal file
View file

View file

@ -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

View file

@ -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: {

1
docs/tags.md Normal file
View file

@ -0,0 +1 @@
# Tags

5
go.mod
View file

@ -1,5 +0,0 @@
module git.theorangeone.net/jake/notes
go 1.20
require github.com/RealOrangeOne/hugo-theme-notes v0.0.0-20230724125946-aaef005ab72e // indirect

2
go.sum
View file

@ -1,2 +0,0 @@
github.com/RealOrangeOne/hugo-theme-notes v0.0.0-20230724125946-aaef005ab72e h1:Bl4Ff7S7pPFkdX0pLA7YAbXDR1wqQVq7YxVA3PLIfws=
github.com/RealOrangeOne/hugo-theme-notes v0.0.0-20230724125946-aaef005ab72e/go.mod h1:ZMXpRbmG28r6mLfK/Nm93LgqjXCgUv+4ySLF3rkjSTo=

View file

@ -1,9 +0,0 @@
# Recipes
@default:
just --list
start:
hugo server
build:
hugo

80
mkdocs.yml Normal file
View file

@ -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
requirements.txt Normal file
View file

@ -0,0 +1,6 @@
mkdocs
mkdocs-material
mdx-include
mkdocs-awesome-pages-plugin
mkdocs-glightbox
mkdocs-git-revision-date-localized-plugin