@@ -8,35 +8,36 @@ powered by this Django application.
8
8
Timeline entries are written in markdown files with YAML frontmatter under the
9
9
` entries ` directory.
10
10
11
- Each file represents a timeline entry. The files are named with the format
12
- ` <date>_<name>.md ` :
13
- - ` date ` : The date is in the ` YYYY-MM-DD ` format, intended for easy sorting in
14
- editor/shell command directory listings. It's also used to sort the entries
15
- before rendering the timeline page.
16
- - ` name ` : The name component is an arbitrary slug in ** kebab-case** . This is used
17
- for linking to individual timeline entries on the page, and will be set in
18
- the ` id ` attribute.
11
+ Each file represents a timeline entry. The file names have the format
12
+ ` <date>_<name>.md ` , where:
13
+ - ` date ` is in ` YYYY-MM-DD ` for easy sorting of files in directory listings,
14
+ also used for sorting of the entries displayed on the timeline page.
15
+ - ` name ` is an arbitrary slug in ` kebab-case ` , used for linking to individual
16
+ timeline entries on the page, which will be set in the ` id ` attribute for each
17
+ timeline item.
19
18
20
19
Each file contains:
21
- - YAML frontmatter. This defines some metadata shown next to each entry in
20
+ - A YAML frontmatter, which defines some metadata shown next to each entry in
22
21
the timeline, including:
23
- - Date: User-facing date label.
24
- - Icon: The CSS class to be used for the icon. Set to ` pydis ` to use the
25
- pydis logo image.
26
- - Icon color: The CSS class that sets the background color of the icon. Leave
27
- empty if the pydis logo is used.
22
+ - ` date ` : User-facing date label.
23
+ - ` icon ` : The CSS class used for the icon, e.g. "fa fa-snowflake". Set to
24
+ ` pydis ` to use the pydis logo image.
25
+ - ` icon_color ` : The CSS class that sets the background color of the icon, e.g.
26
+ "pastel-red". List of available colors can be found in [ the CSS
27
+ file] ( ../../static/css/timeline/timeline.css ) . This can be omitted if the
28
+ pydis logo is used.
28
29
- Markdown content.
29
30
30
31
31
32
## Directory structure
32
33
33
- The app has a single view in ` views.py ` that takes care of reading the ` .md `
34
- files in the ` entires ` directory. This is a standard Django view, mounted in
35
- ` urls.py ` as usual.
34
+ The app has a single view in ` views.py ` that renders the template using the list
35
+ of parsed entries from ` apps.py ` , which reads the markdown files on startup.
36
+ This is a standard Django view, mounted in ` urls.py ` as usual.
36
37
37
- The ` tests ` directory validates that our redirects and helper functions work as
38
- expected. If you made changes to the app and are looking for guidance on adding
39
- new tests, the [ Django tutorial introducing automated
38
+ The ` tests ` directory validates that the page renders successfully as expected.
39
+ If you made changes to the app and are looking for guidance on adding new tests,
40
+ the [ Django tutorial introducing automated
40
41
testing] ( https://docs.djangoproject.com/en/dev/intro/tutorial05/ ) is a good
41
42
place to start.
42
43
0 commit comments