Skip to content

feat(techdocs): Add additional metadata #2684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions images/techdocs/context/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ linguistics-check: validate-pwd vale-sync ## Check spelling, grammar and other l
vale $(MARKDOWN_FILES)

SITE_NAME := $(shell yq --no-doc 'select(document_index == 0) | .metadata.title // .metadata.name' ./catalog-info.yaml)
REPO_NAME := $(shell yq --no-doc 'select(document_index == 0) | .metadata.annotations."github.com/project-slug"' ./catalog-info.yaml)
ENTITY := $(shell yq --no-doc 'select(document_index == 0) | [.metadata.namespace // "default", .kind, .metadata.name] | join("/")' ./catalog-info.yaml)

.PHONY: mkdocs.yml
mkdocs.yml: /usr/local/share/techdocs/mkdocs.yml
cp /usr/local/share/techdocs/mkdocs.yml mkdocs.yml

.PHONY: build
build: mkdocs.yml ## Build the website
export SITE_NAME="$(SITE_NAME)" && export REPO_NAME=$(REPO_NAME) export REPO_URL=$(REPO_URL) && export EDIT_URI=$(EDIT_URI) && techdocs-cli generate --no-docker

ENTITY := $(shell yq --no-doc 'select(document_index == 0) | [.metadata.namespace // "default", .kind, .metadata.name] | join("/")' ./catalog-info.yaml)
export SITE_NAME="$(SITE_NAME)" && export REPO_NAME=$(REPO_NAME) && export REPO_URL=$(REPO_URL) && export EDIT_URI=$(EDIT_URI) && export FETCH_CONTRIBUTORS=$(FETCH_CONTRIBUTORS) && techdocs-cli generate --no-docker --verbose

serve: mkdocs.yml ## Run a preview site
export SITE_NAME="$(SITE_NAME)" && export REPO_NAME=$(REPO_NAME) export REPO_URL=$(REPO_URL) && export EDIT_URI=$(EDIT_URI) && techdocs-cli serve --no-docker
export SITE_NAME="$(SITE_NAME)" && export REPO_NAME=$(REPO_NAME) && export REPO_URL=$(REPO_URL) && export EDIT_URI=$(EDIT_URI) && export FETCH_CONTRIBUTORS=$(FETCH_CONTRIBUTORS) && techdocs-cli serve --no-docker --verbose

.PHONY: publish
publish: site ## Publish the website to the TechDocs Bucket
Expand Down
10 changes: 10 additions & 0 deletions images/techdocs/context/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ site_name: !ENV SITE_NAME
repo_name: !ENV [REPO_NAME, null]
repo_url: !ENV [REPO_URL, null]
edit_uri: !ENV [EDIT_URI, null]
theme:
name: material
plugins:
- techdocs-core
- material/meta
- htmlproofer:
validate_external_urls: false
- git-revision-date-localized:
fallback_to_build_date: true
enable_creation_date: true
- git-committers:
repository: !ENV [REPO_NAME, null]
branch: main
enabled: !ENV [FETCH_CONTRIBUTORS, false]
exclude_committers:
- "web-flow"
- awesome-pages
- ezlinks:
warn_ambiguities: true
Expand Down
1 change: 1 addition & 0 deletions images/techdocs/context/requirements-techdocs.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ mkdocs-link-marker==0.1.3
mkdocs-table-reader-plugin==3.1.0
mkdocs-techdocs-core==1.5.4
pymdown-extensions==10.14.3
mkdocs-git-committers-plugin-2==2.5.0
10 changes: 9 additions & 1 deletion images/techdocs/context/requirements-techdocs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ gitdb==4.0.11 \
gitpython==3.1.44 \
--hash=sha256:9e0e10cda9bed1ee64bc9a6de50e7e38a9c9943241cd7f585f6df3ed28011110 \
--hash=sha256:c87e30b26253bf5418b01b0660f818967f3c503193838337fe5e573331249269
# via mkdocs-git-revision-date-localized-plugin
# via
# mkdocs-git-committers-plugin-2
# mkdocs-git-revision-date-localized-plugin
idna==3.7 \
--hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \
--hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0
Expand Down Expand Up @@ -258,6 +260,7 @@ mkdocs==1.6.0 \
# via
# mkdocs-awesome-pages-plugin
# mkdocs-ezlinks-plugin
# mkdocs-git-committers-plugin-2
# mkdocs-git-revision-date-localized-plugin
# mkdocs-htmlproofer-plugin
# mkdocs-kroki-plugin
Expand All @@ -278,6 +281,10 @@ mkdocs-get-deps==0.2.0 \
--hash=sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c \
--hash=sha256:2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134
# via mkdocs
mkdocs-git-committers-plugin-2==2.5.0 \
--hash=sha256:1778becf98ccdc5fac809ac7b62cf01d3c67d6e8432723dffbb823307d1193c4 \
--hash=sha256:a01f17369e79ca28651681cddf212770e646e6191954bad884ca3067316aae60
# via -r requirements-techdocs.in
mkdocs-git-revision-date-localized-plugin==1.4.5 \
--hash=sha256:395ae0b9eec565c78a76fffc938b70f52774bf2971245482d31aba47018c5fa9 \
--hash=sha256:9e37f1343d314c9cd8f9cbbf117c4bdc1d2d24a0653c5bbd7059d072f2cd0972
Expand Down Expand Up @@ -507,6 +514,7 @@ requests==2.32.0 \
--hash=sha256:f2c3881dddb70d056c5bd7600a4fae312b2a300e39be6a118d30b90bd27262b5 \
--hash=sha256:fa5490319474c82ef1d2c9bc459d3652e3ae4ef4c4ebdd18a21145a47ca4b6b8
# via
# mkdocs-git-committers-plugin-2
# mkdocs-htmlproofer-plugin
# mkdocs-kroki-plugin
# mkdocs-material
Expand Down
Loading