update
This commit is contained in:
parent
f49d4ddfed
commit
d70911b37e
9 changed files with 9 additions and 22 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "example_workdir/template"]
|
||||||
|
path = example_workdir/template
|
||||||
|
url = git@git.724.rocks:Minecon724/blog-template
|
3
TODO.md
3
TODO.md
|
@ -1,3 +1,4 @@
|
||||||
- README & LICENSE
|
- README & LICENSE
|
||||||
- basic standalone template
|
- basic standalone template
|
||||||
- git as part of software
|
- git as part of software
|
||||||
|
- docs
|
||||||
|
|
|
@ -59,8 +59,8 @@ def compile(work_directory: str, template_directory: str=None, target_directory:
|
||||||
while len(articles) > 0:
|
while len(articles) > 0:
|
||||||
page = Page(
|
page = Page(
|
||||||
page_index, pages,
|
page_index, pages,
|
||||||
f'/index/page{page_index - 1}.html' if page > 1 else None,
|
f'/index/page{page_index - 1}.html' if page_index > 1 else None,
|
||||||
f'/index/page{page_index + 1}.html' if page < pages else None
|
f'/index/page{page_index + 1}.html' if page_index < pages else None
|
||||||
)
|
)
|
||||||
|
|
||||||
if page_index == 1:
|
if page_index == 1:
|
||||||
|
|
0
example_workdir/generated_out/static/style.css
Normal file
0
example_workdir/generated_out/static/style.css
Normal file
1
example_workdir/template
Submodule
1
example_workdir/template
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 92b51ec63b2cae148da9b40233b96856d69fa048
|
|
@ -1,7 +0,0 @@
|
||||||
<title>{{ article.title }} - {{ site.name }}</title>
|
|
||||||
<a href="{{ site.url }}">Back to {{ site.name }}</a>
|
|
||||||
|
|
||||||
<h1>{{ article.title }}</h1>
|
|
||||||
<h4>{{ article.summary }}</h4>
|
|
||||||
|
|
||||||
{{ article.content|safe }}
|
|
|
@ -1,6 +0,0 @@
|
||||||
<title>{{ site.name }}</title>
|
|
||||||
|
|
||||||
{% for article in articles %}
|
|
||||||
<h3>{{ article.title }}</h3>
|
|
||||||
<p>{{ article.summary }}</p>
|
|
||||||
{% endfor %}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"name": "basic template",
|
|
||||||
"articles_per_page": 10
|
|
||||||
}
|
|
|
@ -4,7 +4,7 @@ from jinja2 import Environment, Template, FileSystemLoader, select_autoescape
|
||||||
from json import loads
|
from json import loads
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
|
||||||
from article import Article, Page, Page
|
from article import Article, Page, Site
|
||||||
|
|
||||||
TEMPLATE_VERSIONS = [1]
|
TEMPLATE_VERSIONS = [1]
|
||||||
|
|
||||||
|
|
Reference in a new issue