Add page full of text files
This commit is contained in:
parent
7c059148d5
commit
3059c14648
6
content/pages/text-files.md
Normal file
6
content/pages/text-files.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Title: Text Files
|
||||||
|
Template: text-files
|
||||||
|
Slug: x
|
||||||
|
|
||||||
|
|
||||||
|
Qot.
|
1
content/text/test.txt
Normal file
1
content/text/test.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
hello world
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*- #
|
# -*- coding: utf-8 -*- #
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
import os
|
||||||
|
|
||||||
AUTHOR = 'Tanner Collin'
|
AUTHOR = 'Tanner Collin'
|
||||||
SITENAME = 'Tanner Collin'
|
SITENAME = 'Tanner Collin'
|
||||||
|
@ -34,7 +35,7 @@ MARKDOWN = {
|
||||||
'output_format': 'html5',
|
'output_format': 'html5',
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_PATHS = ['images', 'extra']
|
STATIC_PATHS = ['images', 'extra', 'text']
|
||||||
|
|
||||||
EXTRA_PATH_METADATA = {
|
EXTRA_PATH_METADATA = {
|
||||||
#'extra/favicon.svg': {'path': 'favicon.svg'},
|
#'extra/favicon.svg': {'path': 'favicon.svg'},
|
||||||
|
@ -57,5 +58,12 @@ TAGS_SAVE_AS = ''
|
||||||
INDEX_SAVE_AS = 'index.html'
|
INDEX_SAVE_AS = 'index.html'
|
||||||
ARTICLE_URL = '{date:%d}'
|
ARTICLE_URL = '{date:%d}'
|
||||||
ARTICLE_SAVE_AS = '{date:%d}/index.html'
|
ARTICLE_SAVE_AS = '{date:%d}/index.html'
|
||||||
|
PAGE_URL = '{slug}'
|
||||||
|
PAGE_SAVE_AS = '{slug}/index.html'
|
||||||
|
|
||||||
|
def list_text_files():
|
||||||
|
return sorted(os.listdir('./content/text'))
|
||||||
|
|
||||||
|
JINJA_GLOBALS = {'list_text_files': list_text_files}
|
||||||
|
|
||||||
PROD = True
|
PROD = True
|
||||||
|
|
|
@ -38,4 +38,5 @@ BSc. Electrical Engineering from University of Calgary
|
||||||
{% for article in articles_page.object_list if article.category.name == 'Writing' %}
|
{% for article in articles_page.object_list if article.category.name == 'Writing' %}
|
||||||
<a href={{ article.url }}>{{ article.title }}
|
<a href={{ article.url }}>{{ article.title }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<a href=x>[Text Files]
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
4
themes/lite/templates/page.html
Normal file
4
themes/lite/templates/page.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<pre>
|
||||||
|
{{ page.content }}
|
||||||
|
</pre>
|
||||||
|
|
15
themes/lite/templates/text-files.html
Normal file
15
themes/lite/templates/text-files.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block meta %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block style %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Text Files</h1>
|
||||||
|
Here are some various text notes that I share with the public.
|
||||||
|
<hr />
|
||||||
|
{% for f in list_text_files() %}
|
||||||
|
<a href="../text/{{ f }}">{{ f }}</a>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user