Commit 6ef32971 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Merge branch 'master' of gitlab.math.unistra.fr:boileau/nbcourse into develop

parents 0ec69ba3 0ef687be
Pipeline #8357 passed with stage
in 1 minute and 42 seconds
...@@ -83,8 +83,14 @@ class HomePage(Page): ...@@ -83,8 +83,14 @@ class HomePage(Page):
def build_link_name(link_type: str, suffix: str): def build_link_name(link_type: str, suffix: str):
"""Build archive or pdf book links from slug name""" """Build archive or pdf book links from slug name"""
if link_type in self.variables['links']: if link_type in self.variables['links']:
self.variables['links'][link_type]['target'] = \ try:
self.variables['slug_title'] + suffix # For example look for yaml entry: `book: file: filename.pdf`
self.variables['links'][link_type]['target'] = \
self.variables[link_type]['file']
except KeyError:
# Use <slug_title>.pdf
self.variables['links'][link_type]['target'] = \
self.variables['slug_title'] + suffix
# Get chapters from notebook files # Get chapters from notebook files
chapters = [] chapters = []
......
[tool.poetry] [tool.poetry]
name = "nbcourse" name = "nbcourse"
version = "0.2.3" version = "0.2.4"
description = "Create a minisite to publish a course based on Jupyter notebooks" description = "Create a minisite to publish a course based on Jupyter notebooks"
authors = ["Matthieu Boileau <matthieu.boileau@math.unistra.fr>"] authors = ["Matthieu Boileau <matthieu.boileau@math.unistra.fr>"]
license = "MIT" license = "MIT"
......
Markdown is supported
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