A mirror of my website's source code.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 README.txt

View raw Download
text/html • 2.56 kiB
HTML document, ASCII text
        
            
1
== Website Source Code ==
2
3
All of my site is generated using a small Python script.
4
This script is build.py. Keep in mind that you may need
5
to install requirements (and also download Renderers.py
6
from this repo):
7
8
* Jinja2
9
* Markdown2
10
* PyYAML
11
12
This is all that is required. This script is licensed
13
under the LGPL, as I don't currently want to license my
14
site.
15
16
If you plan to base your website on my own, I ask that
17
you simply copy the script, and not my entire site (IE:
18
Please only download build.py and Renderers.py). From
19
there, you will need to create a few folders:
20
21
* views
22
* blog-posts
23
* lists
24
* static
25
26
The following few sections will explain these
27
directories.
28
29
---
30
31
views includes all of your HTML templates which will be
32
used to render all pages on your site. It uses Jinja
33
syntax. You can find a reference for Jinja's syntax on
34
the project's website:
35
36
https://jinja.palletsprojects.com/en/3.1.x/templates/
37
38
---
39
40
blog-posts contains all the markdown source files for
41
your blog-posts. These are written using a somewhat
42
unique format:
43
44
```
45
title: <Title of the article>
46
date: <Initial publication date>
47
updated: <Last modification date (optional)>
48
49
<Article body>
50
```
51
52
Also, I've enabled a bunch of extensions in MD2. Some
53
that matter include:
54
55
* header-ids
56
* markdown-in-html
57
* footnotes
58
* strike
59
60
You can read MD2's Wiki* for more information on these:
61
62
github.com/trentm/python-markdown2/wiki/Extras
63
64
---
65
66
lists includes all lists you may want to make. Lists
67
are a YAML based format.
68
69
To begin with, there's the root list, which includes
70
its title and a starting paragragh, before denoting the
71
rest of the list using the list keyword.
72
73
```
74
title: <Title of list>
75
paragraph: <Starting paragraph>
76
list:
77
```
78
79
The list must be formated as a YAML list. Each element
80
in this list starts with a type. One such type is text.
81
Text is a small section of HTML. It requires there be a
82
text parameter.
83
84
```
85
- type: text
86
text: <text>
87
comment: <additional text>
88
```
89
90
text may also have a comment, which is formated as
91
being in parenthesis. Here's a list of other available
92
types:
93
94
* ```
95
- type: link
96
text: <link text>
97
href: <link link>
98
comment: <additional text>
99
```
100
* ```
101
- type: category
102
title: <category title>
103
id: <id used for the category's header>
104
list:
105
<sub elements>
106
```
107
Note that category can also have other categories.
108
109
---
110
111
static is all static content, it's dumped into the base
112
directory of the output directory.
113
114
---
115
116
Speaking of the output directory: by default, it's at
117
build. build can be deployed to whatever hosting
118
service you are using, such as GitHub Pages.
119