Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 0b2d10a1 authored by Deepak Khatri's avatar Deepak Khatri :dog:
Browse files

Setup books and projects PDF build

parent b5574932
1 merge request!157Site editing guide, link button, remove slug, forward latest to root, and custom 404.html template
......@@ -42,6 +42,8 @@ latex_documents = []
pdf_paths = []
oshw_details = []
board_details = []
book_details = []
project_details = []
with open('conf.yml', 'r') as conf_file:
conf_data = yaml.safe_load(conf_file)
......@@ -79,7 +81,39 @@ with open('conf.yml', 'r') as conf_file:
oshw_details.append([board, path, oshw_id])
# Board basic details
board_details.append([board, path, page, git, forum])
board_details.append([name, path, page, git, forum])
# Books
if(type == "books"):
for book, data in conf_data["books"].items():
name = book
path = data['path']
pdf = data.get('pdf', False)
#Books PDF build details
if(pdf and (name in pdf_build or pdf_build_all)):
pdf_paths.append(path)
tex_name = '-'.join(path.split('/')[1:])
latex_documents.append((path+"/index", tex_name+".tex", "", author, "manual"))
# Book basic details
book_details.append([name, path])
# Projects
if(type == "projects"):
for book, data in conf_data["projects"].items():
project = book
path = data['path']
pdf = data.get('pdf', False)
#Projects PDF build details
if(pdf and (project in pdf_build or pdf_build_all)):
pdf_paths.append(path)
tex_name = '-'.join(path.split('/')[1:])
latex_documents.append((path+"/index", tex_name+".tex", "", author, "manual"))
# Project basic details
project_details.append([name, path])
# -- General configuration --
......@@ -348,6 +382,8 @@ html_context = {
"oshw_details": oshw_details,
"pdf_paths": pdf_paths,
"board_details": board_details,
"book_details": book_details,
"project_details": project_details,
"announcement_message": announcement_message,
"development_version_message": development_version_message,
"forked_version_message": forked_version_message,
......
......@@ -92,5 +92,25 @@ boards:
oshw: PocketBeagle_US000083.svg
# Books
books:
BeagleBone-Cookbook:
path: books/beaglebone-cookbook
pdf: True
PRU-Cookbook:
path: books/pru-cookbook
pdf: True
# Projects
projects:
BB-Config:
path: projects/bb-config
pdf: True
BeagleConnect:
path: projects/beagleconnect
pdf: True
libRobotControl:
path: projects/librobotcontrol
pdf: True
SimpPRU:
path: projects/simppru
pdf: True
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment