Refactoring (#1)
This PR is very far from perfect, and there are some things that do not work yet, but I think it's good enough to merge Co-authored-by: Shyam Saraswati <shyam.saraswati@gmail.com> Co-authored-by: Nikolai Rodionov <nikolai.rodionov@grandcentrix.net> Reviewed-on: https://git.badhouseplants.net/allanger/mkdocs-with-confluence/pulls/1
This commit is contained in:
22
example/Dockerfile
Normal file
22
example/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM python:latest as BUILDER
|
||||
|
||||
FROM BUILDER as plugin_builder
|
||||
WORKDIR /src
|
||||
COPY . /src
|
||||
RUN pip install poetry
|
||||
RUN poetry build
|
||||
RUN mkdir /out
|
||||
RUN mv $(find /src/dist -maxdepth 1 -mindepth 1 -name '*tar.gz') /out/mkdocs_with_confluence.tar.gz
|
||||
|
||||
FROM BUILDER as common_builder
|
||||
ENV MKDOCS_TO_CONFLUENCE=true
|
||||
ARG JIRA_PASSWORD
|
||||
ENV JIRA_PASSWORD=$JIRA_PASSWORD
|
||||
RUN pip install mkdocs mkdocs-material
|
||||
WORKDIR /src
|
||||
COPY ./example /src
|
||||
COPY --from=plugin_builder /out/mkdocs_with_confluence.tar.gz /tmp/
|
||||
RUN pip install /tmp/mkdocs_with_confluence.tar.gz
|
||||
ENTRYPOINT ["mkdocs"]
|
||||
CMD ["serve", "-a", "0.0.0.0:8000"]
|
||||
|
BIN
example/docs/assets/argocd.png
Normal file
BIN
example/docs/assets/argocd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
17
example/docs/index.md
Normal file
17
example/docs/index.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Welcome to MkDocs
|
||||
|
||||
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
|
||||
|
||||
## Commands
|
||||
|
||||
* `mkdocs new [dir-name]` - Create a new project.
|
||||
* `mkdocs serve` - Start the live-reloading docs server.
|
||||
* `mkdocs build` - Build the documentation site.
|
||||
* `mkdocs -h` - Print help message and exit.
|
||||
|
||||
## Project layout
|
||||
|
||||
mkdocs.yml # The configuration file.
|
||||
docs/
|
||||
index.md # The documentation homepage.
|
||||
... # Other markdown pages, images and other files.
|
5
example/docs/section1/page1.md
Normal file
5
example/docs/section1/page1.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Page1
|
||||
|
||||
Hello there
|
||||
|
||||

|
6
example/docs/section1/page2.md
Normal file
6
example/docs/section1/page2.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Page2
|
||||
|
||||
Hello there!
|
||||
<img src="assets/argocd.png"
|
||||
alt="Markdown Monster icon"
|
||||
style="float: left; margin-right: 10px;" />
|
3
example/docs/section1/sub_section/page1.md
Normal file
3
example/docs/section1/sub_section/page1.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Page1
|
||||
|
||||
Hello there
|
3
example/docs/section2/page1.md
Normal file
3
example/docs/section2/page1.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Page1
|
||||
|
||||
Hello there, it's section two
|
3
example/docs/section2/page2.md
Normal file
3
example/docs/section2/page2.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Page2
|
||||
|
||||
Hello there! Section two, can't you see?
|
24
example/mkdocs.yml
Normal file
24
example/mkdocs.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
site_name: My Docs
|
||||
repo_url: https://github.com/allanger/mkdocs_with_confluence
|
||||
nav:
|
||||
# - index: 'index.md'
|
||||
- Section1:
|
||||
- page-1: './section1/page1.md'
|
||||
- page-2: './section1/page2.md'
|
||||
- Sub Section:
|
||||
- page-1: './section1/sub_section/page1.md'
|
||||
- Section2:
|
||||
- page-1: './section2/page1.md'
|
||||
- page-2: './section2/page2.md'
|
||||
theme:
|
||||
name: material
|
||||
plugins:
|
||||
- search
|
||||
- mkdocs-with-confluence:
|
||||
host_url: https://mkdocs-to-conflunce.atlassian.net/wiki/rest/api/content
|
||||
space: MKDOC
|
||||
parent_page_name: MKdocs
|
||||
username: allanguor@gmail.com
|
||||
dryrun: false
|
||||
|
21
example/secret.yaml
Normal file
21
example/secret.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
JIRA_PASSWORD: ENC[AES256_GCM,data:wBghxjYOmFBVJ/lwTXXiMy4sizH2BnSdmQLOoGqmh3opExNTcmKyUgRk8pVXxBumLkxz2PwHnxAlSNoma5hDwUh/z8UrZdpv3zf1U9JkMLpyp41a/D29sjWjizfL2YURgRmrjmaEk4cQzgF2lXh+1LYcH4s8rhvHGAtMIgezTX1J2DG+yyF+P3bp3IM/eq3Ch1xg08MgFht5nl4qnMsTUnZk8qWpSMiRc6nZiHNFIHlEUsDasfG7AMOZMbjo9tWS,iv:UhYmW6eTtgjId+yZE/acOxayNjXTax2dq1Xs1m3xNpY=,tag:yb/ce2ehAUXFbw5m1v1bzA==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1yxxn8xscjdue05apn2knfzjy99gwk4x9djfqzgzg83h0hqnwra7qny775y
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB1TkRNcXZJQ1c1U1M0Sngx
|
||||
YittS1g2Q1VIaC84YWwzNzh0Z0VtRnY2WGxVClBWcXBYM3kvQ1BmWHZ0NFJqSlBi
|
||||
Mjltc0pMRjNnNmpRd1dabmQ4Y205dDQKLS0tIEZMK1JnZlZHaER3SkNNY0pOVXpN
|
||||
a0tPYUI5TXdYUVdudVdDR0svOWd2Z00KNeCnkrIB1Ik0uazO3+aQKY0EEsqFR7Ay
|
||||
FOGlI4GlJu2OXBpQU22eZOxIhwAQILbn29u8yD0ZqT1u4jplW7IdEA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2023-02-20T19:09:10Z"
|
||||
mac: ENC[AES256_GCM,data:K2ZPW7fLYf+o9jBiVqfxPJIgasWBqWm02DBFHpwo+ZiQy2AQlEfzBECm/rudHTBV7hyw46UkA3cZf1bypsIcgkUTI7ztrGN/PNMmq1+Qr29l6jgphwBtaAUK3Kxc9PI5lxYjkzVjybCFuWLP/HTwIrLz2qGRRLb5BeGTrGT+MT0=,iv:/t7RIwP0AeT6ifSuVd/S4+EFfvHzPdeU6HFSKySyjlo=,tag:QrI/8agEDwaLCeN4Ccwl1A==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.7.3
|
Reference in New Issue
Block a user