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
8 changes: 6 additions & 2 deletions build_pdf/admin_book/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ pdf-config: &pdf-config
toc_level: 3
ordered_chapter_level: 3
verbose: false

back_cover: true

# 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
output_path: ../pdf/RockyLinuxAdminGuide.pdf

# Customize your own book
nav:
Expand All @@ -31,3 +32,6 @@ nav:
- admin_guide/09-backups.md
- admin_guide/10-boot.md
- admin_guide/11-tasks.md
- admin_guide/12-network.md
- admin_guide/13-softwares.md
- admin_guide/14-special-authority.md
8 changes: 6 additions & 2 deletions build_pdf/admin_book/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ pdf-config: &pdf-config
toc_level: 3
ordered_chapter_level: 3
verbose: false

back_cover: true

# 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
output_path: ../pdf/RockyLinuxAdminGuide.it.pdf

# Customize your own book
nav:
Expand All @@ -31,3 +32,6 @@ nav:
- admin_guide/09-backups.it.md
- admin_guide/10-boot.it.md
- admin_guide/11-tasks.it.md
- admin_guide/12-network.it.md
- admin_guide/13-softwares.it.md
- admin_guide/14-special-authority.md
37 changes: 37 additions & 0 deletions build_pdf/admin_book/uk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
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
back_cover: true

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

# Customize your own book
nav:
- admin_guide/00-toc.uk.md
- admin_guide/01-presentation.uk.md
- admin_guide/03-commands.uk.md
- admin_guide/04-advanced-commands.uk.md
- admin_guide/05-vi.uk.md
- admin_guide/06-users.uk.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
- admin_guide/12-network.md
- admin_guide/13-softwares.md
- admin_guide/14-special-authority.md
38 changes: 38 additions & 0 deletions build_pdf/admin_book/zh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
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
back_cover: true

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

# Customize your own book
nav:
- admin_guide/00-toc.zh.md
- admin_guide/01-presentation.zh.md
- admin_guide/03-commands.zh.md
- admin_guide/04-advanced-commands.zh.md
- admin_guide/05-vi.zh.md
- admin_guide/06-users.zh.md
- admin_guide/07-file-systems.zh.md
- admin_guide/08-process.zh.md
- admin_guide/09-backups.zh.md
- admin_guide/10-boot.zh.md
- admin_guide/11-tasks.zh.md
- admin_guide/12-network.zh.md
- admin_guide/13-softwares.zh.md
- admin_guide/14-special-authority.md

5 changes: 3 additions & 2 deletions build_pdf/ansible_book/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ pdf-config: &pdf-config
toc_level: 3
ordered_chapter_level: 3
verbose: false

back_cover: true

# 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
output_path: ../pdf/LearningAnsibleWithRocky.pdf

# Customize your own book
nav:
Expand Down
4 changes: 2 additions & 2 deletions build_pdf/ansible_book/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ pdf-config: &pdf-config
toc_level: 3
ordered_chapter_level: 3
verbose: false

back_cover: true
# 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
output_path: ../pdf/LearningAnsibleWithRocky.es.pdf

# Customize your own book
nav:
Expand Down
4 changes: 2 additions & 2 deletions build_pdf/ansible_book/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ pdf-config: &pdf-config
toc_level: 3
ordered_chapter_level: 3
verbose: false

back_cover: true
# 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
output_path: ../pdf/LearningAnsibleWithRocky.it.pdf

# Customize your own book
nav:
Expand Down
5 changes: 3 additions & 2 deletions build_pdf/bash_book/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ pdf-config: &pdf-config
toc_level: 3
ordered_chapter_level: 3
verbose: false

back_cover: true

# 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
output_path: ../pdf/LearningBashWithRocky.pdf

# Customize your own book
nav:
Expand Down
5 changes: 3 additions & 2 deletions build_pdf/bash_book/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ pdf-config: &pdf-config
toc_level: 3
ordered_chapter_level: 3
verbose: false

back_cover: true

# 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
output_path: ../pdf/LearningBashWithRocky.it.pdf

# Customize your own book
nav:
Expand Down
18 changes: 4 additions & 14 deletions build_pdf/build_all.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
#!/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
for book in admin_book ansible_book bash_book middlewares
do
for config_file in $(ls ${SCRIPTPATH}/${book}/*.yml)
do
echo "Building $config_file"
echo "---------------------"
mkdocs build -f $config_file
VERSION=$(date +%Y/%m/%d) mkdocs build -q -f $config_file -d ${SCRIPTPATH}/site/
echo ""
done
rm -Rf ${SCRIPTPATH}/${book}/site/
done
done
rm -Rf ${SCRIPTPATH}/site/
2 changes: 2 additions & 0 deletions build_pdf/build_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ plugins:
# ...

copyright: Copyright &copy; 2023 The Rocky Enterprise Software Foundation
extra:
version: !ENV [VERSION, 'Custom version']
42 changes: 42 additions & 0 deletions build_pdf/middlewares/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
INHERIT: ../build_base.yml

docs_dir: '../../docs/guides'

# 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: 1
ordered_chapter_level: 3
verbose: false
back_cover: true

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

# Customize your own book
nav:
- database/database_mariadb-server.md
- dns/private_dns_server_using_bind.md
- email/postfix_reporting.md
- file_sharing/glusterfs.md
- file_sharing/sftp.md
- file_sharing/secure_ftp_server_vsftpd.md
- network/librenms_monitoring_server.md
- proxies/pound.md
- web/nginx-mainline.md
- web/nginx-multisite.md
- web/apache_hardened_webserver/index.md
- web/apache_hardened_webserver/modsecurity.md
- web/apache_hardened_webserver/ossec-hids.md
- web/apache_hardened_webserver/rkhinter.md
- web/mod_SSL_apache.md
- web/apache-sites-enabled.md
- web/php.md
10 changes: 10 additions & 0 deletions build_pdf/templates/back_cover.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<article id="doc-back_cover">
<div class="wrapper"></div>
{%- set target_url = site_url or repo_url -%}
{% if target_url is defined -%}
<div class="wrapper">
<div>{{ target_url }}</div>
{%- endif %}
</div>
<div class="wrapper"></div>
</article>
24 changes: 24 additions & 0 deletions build_pdf/templates/cover.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<article id="doc-cover">
{% if cover_logo is defined %}
<div class="wrapper upper">
<div class="logo" style="background-image: url({{ cover_logo | to_url }});"></div>
</div>
{% else %}
<div class="wrapper"></div>
{% endif %}
<div class="wrapper">
<h1>{{ cover_title | e }}</h1>
<h2>{{ cover_subtitle | e }}</h2>
<h3>Version : {{ version | string | default('custom') }}</h3>
</div>
<div class="properties">
<address>
{% if author is defined %}
<p id="author">{{ author | e }}</p>
{% endif %}
{% if copyright is defined %}
<p id="copyright">{{ copyright | e }}</p>
{% endif %}
</address>
</div>
</article>
46 changes: 46 additions & 0 deletions build_pdf/templates/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@media print {
/* Adjusts positioning of admonition icon */
.md-typeset :is(.admonition-title,summary):before {
top: 0.6rem;
left: 0.6rem;
}
}

@media print {
.md-typeset {
font-size: 12pt !important;
}
.md-typeset h1 {
font-size: 16pt;
}
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
font-size: 14pt;
}

pre,
code,
var,
samp,
kbd,
tt {
font-family: 'Noto Sans Mono CJK JP', 'Courier New', monospace, serif;
font-size: 1em;
}
.admonition {
font-size: 12pt;
}
}

@media print {
doc-back_cover .logo {
width: 100%;
height: 100%;
background-position: center bottom;
background-repeat: no-repeat;
background-size: contain;
}
}