-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
118 lines (89 loc) · 2.56 KB
/
README.txt
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
== Website Source Code ==
All of my site is generated using a small Python script.
This script is build.py. Keep in mind that you may need
to install requirements (and also download Renderers.py
from this repo):
* Jinja2
* Markdown2
* PyYAML
This is all that is required. This script is licensed
under the LGPL, as I don't currently want to license my
site.
If you plan to base your website on my own, I ask that
you simply copy the script, and not my entire site (IE:
Please only download build.py and Renderers.py). From
there, you will need to create a few folders:
* views
* blog-posts
* lists
* static
The following few sections will explain these
directories.
---
views includes all of your HTML templates which will be
used to render all pages on your site. It uses Jinja
syntax. You can find a reference for Jinja's syntax on
the project's website:
https://jinja.palletsprojects.com/en/3.1.x/templates/
---
blog-posts contains all the markdown source files for
your blog-posts. These are written using a somewhat
unique format:
```
title: <Title of the article>
date: <Initial publication date>
updated: <Last modification date (optional)>
<Article body>
```
Also, I've enabled a bunch of extensions in MD2. Some
that matter include:
* header-ids
* markdown-in-html
* footnotes
* strike
You can read MD2's Wiki* for more information on these:
github.com/trentm/python-markdown2/wiki/Extras
---
lists includes all lists you may want to make. Lists
are a YAML based format.
To begin with, there's the root list, which includes
its title and a starting paragragh, before denoting the
rest of the list using the list keyword.
```
title: <Title of list>
paragraph: <Starting paragraph>
list:
```
The list must be formated as a YAML list. Each element
in this list starts with a type. One such type is text.
Text is a small section of HTML. It requires there be a
text parameter.
```
- type: text
text: <text>
comment: <additional text>
```
text may also have a comment, which is formated as
being in parenthesis. Here's a list of other available
types:
* ```
- type: link
text: <link text>
href: <link link>
comment: <additional text>
```
* ```
- type: category
title: <category title>
id: <id used for the category's header>
list:
<sub elements>
```
Note that category can also have other categories.
---
static is all static content, it's dumped into the base
directory of the output directory.
---
Speaking of the output directory: by default, it's at
build. build can be deployed to whatever hosting
service you are using, such as GitHub Pages.