TechDocs: Added more plugins to mkdocs (#2215)
* Added more plugins to mkdocs * Added missing file * wait with katex extension * delete math equations example * add changelog to readme to keep track of changes * Updated plantuml executable in dockerfile * Update packages/techdocs-container/Dockerfile Co-authored-by: Emma Indal <emmai@spotify.com>
This commit is contained in:
committed by
GitHub
parent
d19ec8d330
commit
043b0d927d
@@ -12,9 +12,18 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM python:3.7.7-alpine3.12
|
||||
FROM python:3.8-alpine
|
||||
|
||||
|
||||
RUN apk update && apk --no-cache add gcc musl-dev openjdk11-jdk curl graphviz ttf-dejavu fontconfig
|
||||
|
||||
RUN curl -L http://sourceforge.net/projects/plantuml/files/plantuml.1.2020.16.jar/download > /opt/plantuml.jar
|
||||
RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.3
|
||||
|
||||
# Create script to call plantuml.jar from a location in path
|
||||
|
||||
RUN echo "java -jar '/opt/plantuml.jar' ${@}" >> /usr/local/bin/plantuml
|
||||
RUN chmod 755 /usr/local/bin/plantuml
|
||||
|
||||
RUN apk update && apk --no-cache add gcc musl-dev
|
||||
RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.3 mkdocs==1.1.2 mkdocs-material==5.3.2 mkdocs-monorepo-plugin==0.4.5 pymdown-extensions==7.1
|
||||
|
||||
ENTRYPOINT [ "mkdocs" ]
|
||||
|
||||
@@ -30,3 +30,32 @@ This is a b c.
|
||||
## xyz
|
||||
|
||||
This is x y z.
|
||||
|
||||
# The attack plan
|
||||
|
||||
{% dot attack_plan.svg
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
Earth [peripheries=2]
|
||||
Mars
|
||||
Earth -> Mars
|
||||
}
|
||||
%}
|
||||
|
||||
```graphviz dot attack_plan.svg
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
Earth [peripheries=2]
|
||||
Mars
|
||||
Earth -> Mars
|
||||
}
|
||||
```
|
||||
|
||||
# PlantUML Samples
|
||||
|
||||
```plantuml classes="uml myDiagram" alt="Diagram placeholder" title="My diagram"
|
||||
@startuml
|
||||
Goofy -> MickeyMouse: calls
|
||||
Goofy <-- MickeyMouse: responds
|
||||
@enduml
|
||||
```
|
||||
|
||||
@@ -47,3 +47,15 @@ python -m black src/
|
||||
```
|
||||
|
||||
**Note:** This will write to all Python files in `src/` with the formatted code. If you would like to only check to see if it passes, simply append the `--check` flag.
|
||||
|
||||
## Changelog
|
||||
|
||||
### 0.0.4
|
||||
|
||||
- Added support for more mkdocs extensions
|
||||
- mkdocs-material
|
||||
- mkdocs-monorepo-plugin
|
||||
- plantuml-markdown
|
||||
- markdown_inline_graphviz_extension
|
||||
- pygments
|
||||
- pymdown-extensions
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
# Note: if you update this, also update `install_requires` in setup.py
|
||||
# https://github.com/mkdocs/mkdocs
|
||||
mkdocs==1.1.2
|
||||
mkdocs-material==5.3.2
|
||||
mkdocs-monorepo-plugin==0.4.5
|
||||
plantuml-markdown==3.4.0
|
||||
markdown_inline_graphviz_extension==1.1
|
||||
pygments==2.6.1
|
||||
pymdown-extensions==7.1
|
||||
|
||||
# The linter using for Python
|
||||
# Note: This requires Python 3.6+ to run, but can format Python 2 code too.
|
||||
|
||||
@@ -18,7 +18,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='mkdocs-techdocs-core',
|
||||
version='0.0.3',
|
||||
version='0.0.4',
|
||||
description='A Mkdocs package that contains TechDocs defaults',
|
||||
long_description='',
|
||||
keywords='mkdocs',
|
||||
@@ -28,7 +28,13 @@ setup(
|
||||
license='Apache-2.0',
|
||||
python_requires='>=3.7',
|
||||
install_requires=[
|
||||
'mkdocs>=1.1.2'
|
||||
'mkdocs>=1.1.2',
|
||||
'mkdocs-material==5.3.2',
|
||||
'mkdocs-monorepo-plugin==0.4.5',
|
||||
'plantuml-markdown==3.4.0',
|
||||
'markdown_inline_graphviz_extension==1.1',
|
||||
'pygments==2.6.1',
|
||||
'pymdown-extensions==7.1'
|
||||
],
|
||||
classifiers=[
|
||||
'Development Status :: 1 - Planning',
|
||||
|
||||
@@ -90,4 +90,7 @@ class TechDocsCore(BasePlugin):
|
||||
}
|
||||
config["markdown_extensions"].append("pymdownx.tilde")
|
||||
|
||||
config["markdown_extensions"].append("markdown_inline_graphviz")
|
||||
config["markdown_extensions"].append("plantuml_markdown")
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user