-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updating mkdocs-base files to match new standard * updating requirements file * adding python files for mkdocs hooks * updating docs to match updated structure * adding compartmentalised img folders * docs: update plugins to make nicer structure * docs: spelling fix * Docs: DevOps update * Docs: update templates * update requirements.txt * fixing build issues * fix build issues * build fixes * Docs: fix dummy link * Docs: update documentation tutorials * Docs: Updating standard files * Docs: updating content
- Loading branch information
1 parent
b292f9e
commit ff8f021
Showing
165 changed files
with
2,761 additions
and
315 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
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
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,5 @@ | ||
#! /usr/bin/env bash | ||
|
||
rm -rf .venv | ||
rm -rf site | ||
rm -rf __pycache__ |
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,5 @@ | ||
#! /usr/bin/env python | ||
|
||
import shortuuid | ||
uuid = shortuuid.uuid() | ||
print (uuid) |
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 |
---|---|---|
|
@@ -10,10 +10,10 @@ theme: | |
- content.code.annotate | ||
- content.tabs.link | ||
- header.autohide | ||
- navigation.expand | ||
# - navigation.expand # This causes the nav menu to auto expand | ||
- navigation.indexes | ||
- navigation.instant | ||
- navigation.sections | ||
# - navigation.sections # This removes the ability to shrink sections on the nav menu but gives the bold headings | ||
- navigation.tabs | ||
- navigation.tabs.sticky | ||
- navigation.top | ||
|
@@ -62,5 +62,59 @@ extra_javascript: | |
- https://unpkg.com/[email protected]/dist/tablesort.min.js | ||
- js/tablesort.js | ||
|
||
# Needed for the hooks below to work | ||
plugins: | ||
- search | ||
- mkdocs-video | ||
- mkdocstrings: | ||
handlers: | ||
python: | ||
paths: [../django_project] | ||
import: | ||
- https://docs.python.org/3/objects.inv | ||
- https://mkdocstrings.github.io/autorefs/objects.inv | ||
options: | ||
# Lots of other nice options can be found at | ||
# https://mkdocstrings.github.io/python/usage/ | ||
docstring_style: sphinx | ||
heading_level: 2 | ||
show_bases: true | ||
show_signature: true | ||
separate_signature: true | ||
show_signature_annotations: true | ||
show_source: true | ||
show_root_heading: true | ||
show_root_full_path: true | ||
show_root_members_full_path: true | ||
merge_init_into_class: true | ||
docstring_options: | ||
ignore_init_summary: false | ||
|
||
- redirects: | ||
redirect_maps: | ||
#see https://github.com/mkdocs/mkdocs-redirects/tree/master#using | ||
#'old.md': 'new.md' | ||
#'old/file.md': 'new/file.md' | ||
#'some_file.md': 'http://external.url.com/foobar' | ||
- enumerate-headings: | ||
toc_depth: 3 | ||
strict: true | ||
increment_across_pages: true | ||
include: | ||
- "*" | ||
exclude: | ||
- index.md | ||
- user/index.md | ||
- administrator/index.md | ||
- developer/index.md | ||
- developer/manual/*.md | ||
- devops/index.md | ||
restart_increment_after: | ||
- second_section.md | ||
|
||
# Hook to add a uuid to every anchor | ||
# see also hook.py and https://github.com/squidfunk/mkdocs-material/discussions/3758#discussioncomment-4397373 | ||
# Note that although the above link implies you can use UUIDs, you have to use numeric IDS not UUIDS | ||
hooks: | ||
- ./uuid_redirects_hook.py | ||
- ./python_manual_hook.py |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import logging | ||
import mkdocs.plugins | ||
import os | ||
log = logging.getLogger('mkdocs') | ||
|
||
@mkdocs.plugins.event_priority(-50) | ||
|
||
|
||
def on_startup(command, dirty): | ||
|
||
template = """ | ||
--- | ||
title: Automatically Generated Python Documentation | ||
summary: DO NOT EDIT THIS FILE MANUALLY : It is created during the mkdocs build process | ||
date: 2023-08-03 | ||
--- | ||
# Python Reference Manual | ||
""" | ||
ignore_list = [ | ||
"__init__", | ||
"migrations", | ||
"tests"] | ||
for root, dirs, files in os.walk("../django_project"): | ||
for file in files: | ||
file = os.path.join(root, file) | ||
ignored = False; | ||
if file.endswith(".py"): | ||
for item in ignore_list: | ||
if item in file: | ||
ignored = True; | ||
#print (item, file, ignored) | ||
if not ignored: | ||
file = file.replace("../django_project/", "::: ") | ||
file = file.replace("/", ".") | ||
file = file.replace(".py", "") | ||
template = template + file + "\n" | ||
output_path = os.path.join( | ||
os.path.dirname(os.path.abspath(__file__)), | ||
"src/developer/manual/index.md") | ||
log.info("Manual will be written to: " + output_path) | ||
file = open(output_path,"wt+") | ||
file.write(template) | ||
file.close() | ||
log.info("Manual written to: " + os.path.realpath(file.name)) |
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 @@ | ||
|
||
mkdocs-with-pdf | ||
mkdocs-material | ||
mdx_gh_links | ||
mkdocs-pdf-export-plugin | ||
mkdocstrings-python | ||
mkdocs-video | ||
mkdocs-redirects | ||
mkdocs-enumerate-headings-plugin | ||
mkdocs-git-revision-date-localized-plugin | ||
# needed for the create-uuid.py helper script | ||
shortuuid | ||
# Needed for mkdocstrings python documentation generator | ||
black |
Oops, something went wrong.