Skip to content
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

Support PDF Export for individual pages. #25

Open
wants to merge 1 commit into
base: master
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
3 changes: 2 additions & 1 deletion .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build & Push docs
on:
on:
push:
branches:
- master
Expand All @@ -13,4 +13,5 @@ jobs:
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
ENABLE_PDF_EXPORT: 1
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ docs/node_modules/
.DS_Store
docs/public/
docs/.cache/

.venv
public
*.log
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This project represents the body of knowledge around business automation solution implementation and
reference architecture and can be considered as a living book, we are writing on a daily basis from the experience gathered with our engagements.
All the content is visible [as a BOOK format here](https://ibm-cloud-architecture.github.io/refarch-dba).
All the content is visible [as a BOOK format here](https://ibm-cloud-architecture.github.io/refarch-dba).

The content of this repository is the source of the digital business automation reference architecture in the [IBM Garage architecture center visible here](https://www.ibm.com/cloud/architecture/architectures/dba-architecture). This git repository is maintained on a weekly basis and includes more content not yet formally published to IBM sites. As we are implementing the end to end solution we are updating this main git repository to keep best practices accurate.

Expand All @@ -13,12 +13,17 @@ The content of this repository is the source of the digital business automation
The content of this repository is written with markdown files, packaged with [MkDocs](https://www.mkdocs.org/) and can be built into a book-readable format by MkDocs build processes.

1. Install MkDocs locally following the [official documentation instructions](https://www.mkdocs.org/#installation).
1. Install MkDocs PDF export following [its documentation](https://github.com/zhaoterryy/mkdocs-pdf-export-plugin).
1. Install Material plugin for mkdocs: `pip install mkdocs-material`
2. `git clone https://github.com/ibm-cloud-architecture/refarch-dba` _(or your forked repository if you plan to edit)_
3. `cd refarch-dba`
4. `mkdocs serve`
5. Go to `http://127.0.0.1:8000/` in your browser.

If you wish to generate PDF files, substitute `EXPORT_PDF_EXPORT=1 mkdocs
serve` for the command above. You can use `EXPORT_PDF_EXPORT=1 mkdocs build` to
create a `public` directory tree that includes the PDF docs for local browsing.

### Building this booklet locally but with docker

In some cases you might not want to alter your Python setup and rather go with a docker image instead. This requires docker is running locally on your computer though.
Expand Down
18 changes: 17 additions & 1 deletion docs/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,20 @@ width: 8rem;

.md-typeset .admonition {
font-size: .75rem;
}
}

@media print {
@page {
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
}
}

body > :not(div.md-container) {
display: none;
}

.md-typeset details {
page-break-inside: auto;
}
}
7 changes: 4 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ use_directory_urls: true
plugins:
- search:
lang: en
- pdf-export:
enabled_if_env: ENABLE_PDF_EXPORT



markdown_extensions:
- attr_list
- admonition
Expand Down Expand Up @@ -69,7 +71,6 @@ nav:
- Overview: technology/index.md
- Automation Decision Service: technology/decision/index.md
- RPA: technology/rpa/index.md
- title: Use cases
- Use Cases:
- Accounts Payable: use-cases/accounts-pay/index.md
- HR Onboarding App: use-cases/hr-onboard-app/index.md
Expand All @@ -78,4 +79,4 @@ nav:
- Onboarding Automation: use-cases/onboarding-automation/index.md
- Shared Services: use-cases/shared-ser/index.md
- Connect Salesforce: use-cases/connect-salesforce/index.md
- Contribute: contribute/index.md
- Contribute: contribute/index.md