-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
120 lines (75 loc) · 2.4 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
COURSE_NAME = 'CS205'
AUTHOR = ''
SEMESTER = ''
YEAR = '2024'
SITEURL = ''
GITHUB = ''
COLOR = '#EFEFEF'
# Define Navbar links
# ex. ('Link Name', 'URL')
# MENUITEMS = [
# # ('Schedule', 'pages/schedule.html'),
# ('Course Flow', 'pages/coursework.html'),
# ('Resources', 'pages/resources.html'),
# ('C/C++ Primer', 'pages/cpp_primer.html'),
# ]
MENUITEMS = [
('Syllabus', 'pages/syllabus.html'),
('Schedule', 'pages/schedule_static.html'),
('Project', 'pages/project.html'),
('Resources', 'pages/resources.html'),
('C/C++ Primer', 'pages/cpp_primer.html'),
]
# Uncomment following line if you want document-relative URLs when developing
RELATIVE_URLS = True
PATH = 'content'
OUTPUT_PATH = 'docs'
TIMEZONE = 'EST'
DEFAULT_LANG = 'en'
# ================================
# Pelican Settings
# Do not modify
# ================================
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
DEFAULT_PAGINATION = 10
DEFAULT_CATEGORY = 'pages'
AUTHORS_SAVE_AS = ''
CATEGORIES_SAVE_AS = ''
ARCHIVES_SAVE_AS = ''
ARTICLE_SAVE_AS = '{category}/{slug}/index.html'
ARTICLE_URL = '{category}/{slug}/'
AUTHOR_URL = ''
AUTHOR_SAVE_AS = ''
TAG_SAVE_AS = ''
INDEX_SAVE_AS = 'pages/topic_index.html'
THEME_STATIC_DIR = 'style'
DELETE_OUTPUT_DIRECTORY = True
MARKUP = ['md', 'ipynb']
PLUGIN_PATHS = ['plugins']
from pelican_jupyter import markup as nb_markup
# render_math: python -m pip install pelican-katex
PLUGINS = [nb_markup, 'tipue_search', 'pelican_katex']
IGNORE_FILES = [
'.#*', '.ipynb_checkpoints', 'README.md', "*.html", "__pycache__",
"*.pptx", ".placeholder", ".DS_Store", "*.ipynb-meta", "*.csv", "*.json",
"*.txt", "*.xmls", "*.aux", "*.snm", "*.toc", "*.out", "*.nav", 'HW*.md'
]
STATIC_PATHS = ['lectures', 'labs', 'homeworks']
# DIRECT_TEMPLATES = ['index', 'search', 'tags', 'category']
DIRECT_TEMPLATES = ['index', 'search']
# Jinja2 template used to render jupyter notebooks
IPYNB_EXPORT_TEMPLATE = 'themes/templates/nbconvert/lab/base.html.j2'
import re
JINJA_FILTERS = {
'original_content': lambda x: re.search(r"content/(.*)", x).group(1)
}
USE_FOLDER_AS_CATEGORY = False
import logging
LOG_FILTER = [
(logging.WARN, "Empty alt attribute for image %s in %s"),
(logging.WARN, "Meta tag in file %s does not have a 'name' attribute, skipping. Attributes: content=%s")
]