-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PMM-7 Fix PDF rendering (phase I) * chore: trigger the build * PMM-7 Apply more css fixes for PDF * PMM-7 Add doc-build-image make target * PMM-7 Apply different fixes * PMM-7 Remove redundant markup * PMM-7 Update the Makefile * PMM-7 Provide comments in css overrides for PDF * PMM-7 Add a local build preview
- Loading branch information
Showing
11 changed files
with
98 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,36 @@ doc-check-images: ## Check if all images are used in documentation | |
doc-remove-images: ## Remove unused images from documentation | ||
@ACTION=remove $(DIR)/resources/bin/check-images.sh | ||
|
||
doc-build: ## Build documentation | ||
doc-build: ## Build documentation (used in CI) | ||
# This command is used to build and deploy a preview to onrender.com | ||
# Preview URL: https://pmm-doc.onrender.com | ||
|
||
mkdocs build -f $(DIR)/mkdocs.yml | ||
|
||
doc-build-pdf: ## Build documentation in PDF format | ||
doc-build-pdf: ## Build documentation in PDF format | ||
docker run --rm --platform=linux/amd64 -v $(DIR):/docs -w /build perconalab/pmm-doc-md:latest \ | ||
bash -c " \ | ||
cp -r /docs/* /build/ && \ | ||
git init && \ | ||
git config user.email '[email protected]' && \ | ||
git add --all && \ | ||
git commit -am 'Initial commit' > /dev/null && \ | ||
mkdocs build -f mkdocs-pdf.yml && \ | ||
cp /build/site/pdf/*.pdf /docs/ \ | ||
" | ||
|
||
doc-build-image: ## Build perconalab/pmm-doc-md:latest image | ||
# @docker buildx build --platform=linux/amd64 --progress=plain -t perconalab/pmm-doc-md:latest -f documentation/resources/Dockerfile.build . | ||
docker run --rm --platform=linux/amd64 -v $(DIR):/docs -w /build -e ENABLE_PDF_EXPORT=1 perconalab/pmm-doc-md:latest \ | ||
bash -c "cp -r /docs/* /build/ && \ | ||
ls -la /build && \ | ||
git init && \ | ||
git config user.email '[email protected]' && \ | ||
git add --all && \ | ||
git commit -am 'Initial commit' && \ | ||
mkdocs build -f mkdocs-pdf.yml && \ | ||
cp /build/site/pdf/*.pdf /docs/" | ||
|
||
doc-build-preview: ## Build documentation and preview at http://localhost:8000 | ||
docker run --rm --platform=linux/amd64 -p 8000:8000 -v $(DIR):/docs -w /build perconalab/pmm-doc-md:latest \ | ||
bash -c " \ | ||
cp -r /docs/* /build/ && \ | ||
git init && \ | ||
git config user.email '[email protected]' && \ | ||
git add --all && \ | ||
git commit -am 'Initial commit' > /dev/null && \ | ||
mkdocs serve -f mkdocs.yml --dev-addr=0.0.0.0:8000 \ | ||
" | ||
doc-search-icons: ## Search for icons that can be used in documentation | ||
@open https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/#search |
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 |
---|---|---|
@@ -1,8 +1,28 @@ | ||
@media print { | ||
/* Adjusts positioning of admonition icon */ | ||
.md-typeset :is(.admonition-title,summary):before { | ||
top: 0.6rem; | ||
left: 0.6rem; | ||
} | ||
/* Adjusts positioning of admonition icon */ | ||
.md-typeset :is(.admonition-title,summary):before { | ||
top: 0.6rem; | ||
left: 0.6rem; | ||
} | ||
|
||
/* Do not render html tags with this class in PDF */ | ||
.no-pdf { | ||
display: none !important; | ||
} | ||
|
||
/* Modify rendering of numbered lists in PDF */ | ||
.power-number+ol>li::before, | ||
.power-number+ol ol>li::before { | ||
background-color: var(--md-default-bg-color); | ||
color: var(--md-typeset-color); | ||
border-radius: 0; | ||
width: 1.5em; | ||
margin-left: -1.7em; | ||
opacity: 1; | ||
} | ||
|
||
.tabbed-content { | ||
display: contents; | ||
} | ||
} | ||
|
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
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
Oops, something went wrong.