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

[DO NOT DELETE] Added directives for mkdocs-pdf-export-plugin #104

Open
wants to merge 2 commits into
base: dev
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
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,20 @@ The following list of words should be avoided:
- Various
- Automatically
- Finally


## Note: mkdocs-pdf-export-plugin

Install the required dependencies before installing the [plugin itself](https://github.com/shauser/mkdocs-pdf-export-plugin) as shown below. The plugin allows to export the documentation into pdf document(s).

```bash
brew install cairo pango gdk-pixbuf libffi
```

Install [pyenv](https://github.com/pyenv/pyenv) to control python versions and install python3 (3.7.0) through it.

After that, create a virtual environment as below, and use it to serve mkdocs:

```bash
virtualenv -p python3 .virtualenv-3.7.0
```
17 changes: 17 additions & 0 deletions docs/extra/css/pdf.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@page {
/*size: a4 portrait;*/
margin: 25mm 10mm 25mm 10mm;
counter-increment: page;
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
white-space: pre;
color: grey;
@top-left {
content: '© 2018 Exabyte Inc.';
}
@top-center {
content: string(chapter);
}
@top-right {
content: 'Page ' counter(page);
}
}
11 changes: 11 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ extra_css:
- extra/css/images.css
- extra/css/super-fences.css
- extra/css/properties.css
- extra/css/pdf.css

extra_javascript:
- extra/js/giffer.js
Expand All @@ -29,6 +30,16 @@ extra:
link: https://github.com/exabyte-io
- type: linkedin
link: https://www.linkedin.com/company/exabyte-io

# Pass ENABLE_PDF_EXPORT=1 to enable export
plugins:
- search
- pdf-export:
verbose: true
media_type: print
combined: true
enabled_if_env: ENABLE_PDF_EXPORT

markdown_extensions:
- markdown_include.include:
base_path: esse
Expand Down