Skip to content
Merged
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
35 changes: 35 additions & 0 deletions .github/workflows/generate-pdfs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Mkdocs build PDFs

on:
push:
branches:
- main
schedule:
- cron: '0 12 1 * *'
workflow_dispatch:

jobs:
build_pdfs:
runs-on: ubuntu-latest
name: Build PDFs
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ${PWD}/build_pdf/requirements.txt

- name: Build all
run: ${PWD}/build_pdf/build_all.sh

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: pdfs
path: build_pdf/pdf/*
24 changes: 24 additions & 0 deletions build_pdf/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# How to generate your own book

## Installation

First, fork this repo.

Next, please install the requirements:

```bash
pip install --user -r requirements.txt
```

Then run the build process:

```bash
cd build_pdf
mkdocs build -f path_to_config_file.yml
```

or launch the bash script to build everything:

```bash
bash build_all.sh
```
33 changes: 33 additions & 0 deletions build_pdf/admin_book/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
INHERIT: ../build_base.yml

# Do not modify this block
pdf-config: &pdf-config
author: Rocky Documentation Team
cover: true
cover_logo: ../assets/rocky-linux-logo.svg
cover_subtitle: A book from the Documentation Team
toc_level: 3
ordered_chapter_level: 3
verbose: false

# You are free to configure here what you want
plugins:
- with-pdf:
<<: *pdf-config
cover_title: Rocky Linux Admin Guide (English version)
output_path: ../../pdf/RockyLinuxAdminGuide.pdf

# Customize your own book
nav:
- admin_guide/00-toc.md
- admin_guide/01-presentation.md
- admin_guide/03-commands.md
- admin_guide/04-advanced-commands.md
- admin_guide/05-vi.md
- admin_guide/06-users.md
- admin_guide/07-file-systems.md
- admin_guide/08-process.md
- admin_guide/09-backups.md
- admin_guide/10-boot.md
- admin_guide/11-tasks.md
33 changes: 33 additions & 0 deletions build_pdf/admin_book/it.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
INHERIT: ../build_base.yml

# Do not modify this block
pdf-config: &pdf-config
author: Rocky Documentation Team
cover: true
cover_logo: ../assets/rocky-linux-logo.svg
cover_subtitle: A book from the Documentation Team
toc_level: 3
ordered_chapter_level: 3
verbose: false

# You are free to configure here what you want
plugins:
- with-pdf:
<<: *pdf-config
cover_title: Rocky Linux Admin Guide (Italian version)
output_path: ../../pdf/RockyLinuxAdminGuide.it.pdf

# Customize your own book
nav:
- admin_guide/00-toc.it.md
- admin_guide/01-presentation.it.md
- admin_guide/03-commands.it.md
- admin_guide/04-advanced-commands.it.md
- admin_guide/05-vi.it.md
- admin_guide/06-users.it.md
- admin_guide/07-file-systems.it.md
- admin_guide/08-process.it.md
- admin_guide/09-backups.it.md
- admin_guide/10-boot.it.md
- admin_guide/11-tasks.it.md
31 changes: 31 additions & 0 deletions build_pdf/ansible_book/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
INHERIT: ../build_base.yml

# Do not modify this block
pdf-config: &pdf-config
author: Rocky Documentation Team
cover: true
cover_logo: ../assets/rocky-linux-logo.svg
cover_subtitle: A book from the Documentation Team
toc_level: 3
ordered_chapter_level: 3
verbose: false

# You are free to configure here what you want
plugins:
- with-pdf:
<<: *pdf-config
cover_title: Learning Ansible with Rocky (English version)
output_path: ../../pdf/LearningAnsibleWithRocky.pdf

# Customize your own book
nav:
- learning_ansible/00-toc.md
- learning_ansible/01-basic.md
- learning_ansible/02-advanced.md
- learning_ansible/03-working-with-files.md
- learning_ansible/04-ansible-galaxy.md
- learning_ansible/05-deployments.md
- learning_ansible/06-large-scale-infrastructure.md
- learning_ansible/07-working-with-filters.md
- learning_ansible/08-management-server-optimizations.md
31 changes: 31 additions & 0 deletions build_pdf/ansible_book/es.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
INHERIT: ../build_base.yml

# Do not modify this block
pdf-config: &pdf-config
author: Rocky Documentation Team
cover: true
cover_logo: ../assets/rocky-linux-logo.svg
cover_subtitle: A book from the Documentation Team
toc_level: 3
ordered_chapter_level: 3
verbose: false

# You are free to configure here what you want
plugins:
- with-pdf:
<<: *pdf-config
cover_title: Learning Ansible with Rocky (Spanish version)
output_path: ../../pdf/LearningAnsibleWithRocky.es.pdf

# Customize your own book
nav:
- learning_ansible/00-toc.es.md
- learning_ansible/01-basic.es.md
- learning_ansible/02-advanced.es.md
- learning_ansible/03-working-with-files.es.md
- learning_ansible/04-ansible-galaxy.es.md
- learning_ansible/05-deployments.es.md
- learning_ansible/06-large-scale-infrastructure.es.md
- learning_ansible/07-working-with-filters.es.md
- learning_ansible/08-management-server-optimizations.es.md
31 changes: 31 additions & 0 deletions build_pdf/ansible_book/it.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
INHERIT: ../build_base.yml

# Do not modify this block
pdf-config: &pdf-config
author: Rocky Documentation Team
cover: true
cover_logo: ../assets/rocky-linux-logo.svg
cover_subtitle: A book from the Documentation Team
toc_level: 3
ordered_chapter_level: 3
verbose: false

# You are free to configure here what you want
plugins:
- with-pdf:
<<: *pdf-config
cover_title: Learning Ansible with Rocky (Italian version)
output_path: ../../pdf/LearningAnsibleWithRocky.it.pdf

# Customize your own book
nav:
- learning_ansible/00-toc.it.md
- learning_ansible/01-basic.it.md
- learning_ansible/02-advanced.it.md
- learning_ansible/03-working-with-files.it.md
- learning_ansible/04-ansible-galaxy.it.md
- learning_ansible/05-deployments.it.md
- learning_ansible/06-large-scale-infrastructure.it.md
- learning_ansible/07-working-with-filters.it.md
- learning_ansible/08-management-server-optimizations.it.md
31 changes: 31 additions & 0 deletions build_pdf/bash_book/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
INHERIT: ../build_base.yml

# Do not modify this block
pdf-config: &pdf-config
author: Rocky Documentation Team
cover: true
cover_logo: ../assets/rocky-linux-logo.svg
cover_subtitle: A book from the Documentation Team
toc_level: 3
ordered_chapter_level: 3
verbose: false

# You are free to configure here what you want
plugins:
- with-pdf:
<<: *pdf-config
cover_title: Learning Bash with Rocky (English version)
output_path: ../../pdf/LearningBashWithRocky.pdf

# Customize your own book
nav:
- learning_bash/00-toc.md
- learning_bash/01-first-script.md
- learning_bash/02-using-variables.md
- learning_bash/03-data-entry-and-manipulations.md
- learning_bash/04-check-your-knowledge.md
- learning_bash/05-tests.md
- learning_bash/06-conditionnal-structures.md
- learning_bash/07-loops.md
- learning_bash/08-check-your-knowledge.md
31 changes: 31 additions & 0 deletions build_pdf/bash_book/it.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
INHERIT: ../build_base.yml

# Do not modify this block
pdf-config: &pdf-config
author: Rocky Documentation Team
cover: true
cover_logo: ../assets/rocky-linux-logo.svg
cover_subtitle: A book from the Documentation Team
toc_level: 3
ordered_chapter_level: 3
verbose: false

# You are free to configure here what you want
plugins:
- with-pdf:
<<: *pdf-config
cover_title: Learning Bash with Rocky (Italian version)
output_path: ../../pdf/LearningBashWithRocky.it.pdf

# Customize your own book
nav:
- learning_bash/00-toc.it.md
- learning_bash/01-first-script.it.md
- learning_bash/02-using-variables.it.md
- learning_bash/03-data-entry-and-manipulations.it.md
- learning_bash/04-check-your-knowledge.it.md
- learning_bash/05-tests.it.md
- learning_bash/06-conditionnal-structures.it.md
- learning_bash/07-loops.it.md
- learning_bash/08-check-your-knowledge.it.md
26 changes: 26 additions & 0 deletions build_pdf/build_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# config_files=(
# admin_book/en
# ansible_book/build_ansible_book
# admin_book/build_admin_book_it
# bash_book/build_bash_book

# ansible_book/build_ansible_book_it
# bash_book/build_bash_book_it
# ansible_book/build_ansible_book_es
# )
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cd $SCRIPTPATH

for book in admin_book ansible_book bash_book
do
for config_file in $(ls ${SCRIPTPATH}/${book}/*.yml)
do
echo "Building $config_file"
echo "---------------------"
mkdocs build -f $config_file
echo ""
done
rm -Rf ${SCRIPTPATH}/${book}/site/
done
61 changes: 61 additions & 0 deletions build_pdf/build_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
site_name: 'Documentation'
site_url: 'https://docs.rockylinux.org'
docs_dir: '../../docs/books'

theme:
name: material
font:
text: Red Hat Text
features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
- search.suggest
logo: assets/logo.png
favicon: assets/logo.png
palette:
- scheme: default
media: "(prefers-color-scheme: light)"
toggle:
icon: material/weather-night
name: Switch to dark mode
primary: black
- scheme: slate
media: "(prefers-color-scheme: dark)"
toggle:
icon: material/weather-sunny
name: Switch to light mode
primary: black

markdown_extensions:
- abbr
- attr_list
- admonition
- toc:
permalink: true
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.keys
- pymdownx.tabbed
- pymdownx.details
- pymdownx.tasklist
- footnotes
- def_list
- meta

plugins:
- awesome-pages
- tags

# Page tree
# nav:
# - learning_ansible/00-toc.md
# - learning_ansible/01-basic.md
# - learning_ansible/02-advanced.md
# ...

copyright: Copyright &copy; 2023 The Rocky Enterprise Software Foundation
10 changes: 10 additions & 0 deletions build_pdf/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mkdocs
mkdocs-awesome-pages-plugin
mkdocs-git-revision-date-localized-plugin
mkdocs-localsearch
mkdocs-material
mkdocs-redirects
mkdocs-static-i18n
jieba
mkdocs-with-pdf
qrcode
3 changes: 3 additions & 0 deletions docs/assets/rocky-linux-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.