Skip to content

Commit

Permalink
Adopt MkDocs and use Read the Docs theme
Browse files Browse the repository at this point in the history
Co-authored-by: LepordCat <164488750+LepordCat@users.noreply.github.com>
Co-authored-by: isaak654 <isaak654@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 4, 2024
1 parent 178a7f4 commit 859f027
Show file tree
Hide file tree
Showing 488 changed files with 9,604 additions and 9,153 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: lycheeverse/lychee-action@v1.10.0
with:
# Check all markdown files in repo
args: --user-agent 'curl/8.9.0' -vvv --no-progress --max-redirects 100 --accept 200,403,429,500 './**/*.md'
args: --base ./docs --user-agent 'curl/8.9.0' -vvv --no-progress --max-redirects 100 --accept 200,403,429,500 './**/*.md'
fail: true

# To avoid automated spam, try to find an existing open issue before opening a new one
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish
permissions:
contents: write
deployments: write
on:
workflow_dispatch:
push:
branches:
- main



jobs:
pages:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
- name: Setup Dependencies
run: pip install -r requirements.txt
- name: Build & Publish
run: python -m mkdocs gh-deploy
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- uses: actions/upload-artifact@v4.3.1
with:
path: './site'

163 changes: 163 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# MkDocs documentation
site*/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# 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

# 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

# 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/
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ A GitHub Pages site based on this content is also available: [https://sandboxie-

## Help Topics

* [Getting Started with Sandboxie](Content/GettingStarted.md)
* [General Usage Tips](Content/UsageTips.md)
* [Usage Manual for Sandboxie Control](Content/SandboxieControl.md)
* [Known Conflicts](Content/KnownConflicts.md)
* [Frequently Asked Questions](Content/FrequentlyAskedQuestions.md)
* [Advanced Topics](Content/AdvancedTopics.md)
* [Technical Aspects](Content/TechnicalAspects.md)
* [SBIE Messages](Content/SBIEMessages.md)
* [Command Line Usage](Content/StartCommandLine.md)
* [Sandboxie Configuration File](Content/SandboxieIni.md)
* [Resource Access Settings](Content/ResourceAccess.md)
* [Sandboxie Plus Migration Guide](Content/PlusMigrationGuide.md)
* [Sandboxie Plus Features](PlusContent/Plus-Features.md)
* [All Pages Index](Content/AllPages.md)
* [Getting Started with Sandboxie](docs/Content/GettingStarted.md)
* [General Usage Tips](docs/Content/UsageTips.md)
* [Usage Manual for Sandboxie Control](docs/Content/SandboxieControl.md)
* [Known Conflicts](docs/Content/KnownConflicts.md)
* [Frequently Asked Questions](docs/Content/FrequentlyAskedQuestions.md)
* [Advanced Topics](docs/Content/AdvancedTopics.md)
* [Technical Aspects](docs/Content/TechnicalAspects.md)
* [SBIE Messages](docs/Content/SBIEMessages.md)
* [Command Line Usage](docs/Content/StartCommandLine.md)
* [Sandboxie Configuration File](docs/Content/SandboxieIni.md)
* [Resource Access Settings](docs/Content/ResourceAccess.md)
* [Sandboxie Plus Migration Guide](docs/Content/PlusMigrationGuide.md)
* [Sandboxie Plus Features](docs/PlusContent/Plus-Features.md)
* [All Pages Index](docs/Content/AllPages.md)

## Get Sandboxie
Select from two editions:

* Get Sandboxie Plus if you are a first-time user or want the latest features.
* Get Sandboxie Classic if you have used Sandboxie for a long time.

[Feature Comparison](Content/FeatureComparison.md) | [System requirements](https://github.com/sandboxie-plus/Sandboxie#sandboxie) | [Changelog](https://github.com/sandboxie-plus/Sandboxie/blob/master/CHANGELOG.md) | [Download the latest release](https://github.com/sandboxie-plus/Sandboxie/releases/latest)
[Feature Comparison](docs/Content/FeatureComparison.md) | [System requirements](https://github.com/sandboxie-plus/Sandboxie#sandboxie) | [Changelog](https://github.com/sandboxie-plus/Sandboxie/blob/master/CHANGELOG.md) | [Download the latest release](https://github.com/sandboxie-plus/Sandboxie/releases/latest)

## Contribute
If you have development, testing or translation skills, then feel free to check out our [Contribution guidelines](https://github.com/sandboxie-plus/Sandboxie/blob/master/CONTRIBUTING.md).
24 changes: 24 additions & 0 deletions RootReadme/plugin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import re

from mkdocs.config.base import Config
from mkdocs.config.config_options import Type
from mkdocs.config.defaults import MkDocsConfig
from mkdocs.plugins import BasePlugin
from mkdocs.structure.files import Files
from mkdocs.structure.pages import Page


def _replacer(content):
return re.sub(r'(\[.*]\(\s*)docs/(.*\))', r'\1\2', content)


class RootReadmeConfig(Config):
readme = Type(str, default='readme.md')


class RootReadme(BasePlugin[RootReadmeConfig]):
def on_page_markdown(self, markdown: str, *, page: Page, config: MkDocsConfig, files: Files):
if self.config.readme and page.is_index:
with open(self.config.readme) as f:
readme = f.read()
return _replacer(readme)
10 changes: 10 additions & 0 deletions RootReadme/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "RootReadme"
version = "0.1"

[project.entry-points."mkdocs.plugins"]
RootReadme = "RootReadme.plugin:RootReadme"
3 changes: 0 additions & 3 deletions _config.yml

This file was deleted.

59 changes: 0 additions & 59 deletions _layouts/default.html

This file was deleted.

Loading

0 comments on commit 859f027

Please sign in to comment.