desc
This commit is contained in:
parent
cc1c7ec065
commit
e944129627
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,3 +1,8 @@
|
|||||||
|
conf.yml
|
||||||
|
public/
|
||||||
|
content/events
|
||||||
|
content/bibliography
|
||||||
|
|
||||||
# ---> macOS
|
# ---> macOS
|
||||||
# General
|
# General
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@ -7,6 +12,7 @@
|
|||||||
# Icon must end with two \r
|
# Icon must end with two \r
|
||||||
Icon
|
Icon
|
||||||
|
|
||||||
|
|
||||||
# Thumbnails
|
# Thumbnails
|
||||||
._*
|
._*
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,10 @@
|
|||||||
# Mathematics & Artifice
|
# Mathematics & Artifice
|
||||||
|
|
||||||
Site logics of "Mathematics & Artifice"
|
Site logics of "Mathematics & Artifice"
|
||||||
|
|
||||||
|
'''
|
||||||
|
> python -m venv venv
|
||||||
|
> source venv/bin/activate
|
||||||
|
> pip install -r requirements.txt
|
||||||
|
> python make.py
|
||||||
|
'''
|
||||||
5
content/description.md
Normal file
5
content/description.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
type: 'desc'
|
||||||
|
---
|
||||||
|
|
||||||
|
We are a reading group based at Utrecht University interested in the historical, philosophical, and contemporary aspects of mathematics.
|
||||||
17
make.py
17
make.py
@ -49,10 +49,17 @@ if __name__ == "__main__":
|
|||||||
# section {events + readings}
|
# section {events + readings}
|
||||||
section_template = jinja2.Template(utils.read_file(partials['section']))
|
section_template = jinja2.Template(utils.read_file(partials['section']))
|
||||||
|
|
||||||
|
content_dir = pathlib.Path(conf['content'])
|
||||||
|
|
||||||
# events
|
# events
|
||||||
events = list(utils.get_files_in_subdir(conf['content'], 'event', 'md').values())
|
events_dir = content_dir / 'events'
|
||||||
upcoming_events = []
|
upcoming_events = []
|
||||||
previous_events = []
|
previous_events = []
|
||||||
|
|
||||||
|
if not events_dir.exists():
|
||||||
|
print("path content/events does not exist.")
|
||||||
|
else:
|
||||||
|
events = list(utils.get_files_in_subdir(conf['content'], 'event', 'md').values())
|
||||||
for e in events:
|
for e in events:
|
||||||
p = frontmatter.load(e)
|
p = frontmatter.load(e)
|
||||||
summary = f"{p['title']} - {p['date']}"
|
summary = f"{p['title']} - {p['date']}"
|
||||||
@ -68,9 +75,13 @@ if __name__ == "__main__":
|
|||||||
upcoming = section_template.render(section_id='events', section_title="Upcoming session(s)", section_items=upcoming_events)
|
upcoming = section_template.render(section_id='events', section_title="Upcoming session(s)", section_items=upcoming_events)
|
||||||
previous = section_template.render(section_id='archive', section_title="Previous sessions", section_items=previous_events)
|
previous = section_template.render(section_id='archive', section_title="Previous sessions", section_items=previous_events)
|
||||||
|
|
||||||
# reading bibliography
|
# bibliography
|
||||||
reading = ""
|
reading = ""
|
||||||
bibliography_dir = pathlib.Path(conf['content']) / "bibliography"
|
bibliography_dir = content_dir / "bibliography"
|
||||||
|
|
||||||
|
if not bibliography_dir.exists():
|
||||||
|
print("path content/bibliography does not exist.")
|
||||||
|
else:
|
||||||
bibliography = utils.ls_dir(bibliography_dir)
|
bibliography = utils.ls_dir(bibliography_dir)
|
||||||
|
|
||||||
for b in bibliography:
|
for b in bibliography:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user