summaryrefslogtreecommitdiff
path: root/src/pyssg/plt
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyssg/plt')
-rw-r--r--src/pyssg/plt/default.ini16
-rw-r--r--src/pyssg/plt/default.yaml18
-rw-r--r--src/pyssg/plt/index.html4
-rw-r--r--src/pyssg/plt/mandatory_config.yaml14
-rw-r--r--src/pyssg/plt/page.html2
-rw-r--r--src/pyssg/plt/rss.xml4
-rw-r--r--src/pyssg/plt/static_config.yaml8
-rw-r--r--src/pyssg/plt/tag.html2
8 files changed, 46 insertions, 22 deletions
diff --git a/src/pyssg/plt/default.ini b/src/pyssg/plt/default.ini
deleted file mode 100644
index ab4eac1..0000000
--- a/src/pyssg/plt/default.ini
+++ /dev/null
@@ -1,16 +0,0 @@
-[path]
-src=src
-dst=dst
-plt=plt
-[url]
-main=https://example.com
-static=https://static.example.com
-default_image=/images/default.png
-[fmt]
-date=%%a, %%b %%d, %%Y @ %%H:%%M %%Z
-list_date=%%b %%d
-list_sep_date=%%B %%Y
-[info]
-title=Example site
-[other]
-force=False \ No newline at end of file
diff --git a/src/pyssg/plt/default.yaml b/src/pyssg/plt/default.yaml
new file mode 100644
index 0000000..c90d44d
--- /dev/null
+++ b/src/pyssg/plt/default.yaml
@@ -0,0 +1,18 @@
+%YAML 1.2
+---
+define: &root "$HOME/pyssg/site_example/"
+
+title: "Example site"
+path:
+ src: !join [*root, "src"]
+ dst: !join [*root, "dst"]
+ plt: !join [*root, "plt"]
+url:
+ main: "https://example.com"
+ static: "https://static.example.com"
+ default_image: "/images/default.png"
+fmt:
+ date: "%a, %b %d, %Y @ %H:%M %Z"
+ list_date: "%b %d"
+ list_sep_date: "%B %Y"
+... \ No newline at end of file
diff --git a/src/pyssg/plt/index.html b/src/pyssg/plt/index.html
index d061625..96d66ef 100644
--- a/src/pyssg/plt/index.html
+++ b/src/pyssg/plt/index.html
@@ -3,10 +3,10 @@
<head>
<meta charset="utf-8">
<base href="{{config['url']['static']}}">
- <title>Index -- {{config['info']['title']}}</title>
+ <title>Index -- {{config['title']}}</title>
</head>
<body>
- <h1>Index -- {{config['info']['title']}}</h1>
+ <h1>Index -- {{config['title']}}</h1>
<p>Some text here.</p>
<p>Tags:
diff --git a/src/pyssg/plt/mandatory_config.yaml b/src/pyssg/plt/mandatory_config.yaml
new file mode 100644
index 0000000..52bfa04
--- /dev/null
+++ b/src/pyssg/plt/mandatory_config.yaml
@@ -0,0 +1,14 @@
+%YAML 1.2
+---
+title:
+path:
+ src:
+ dst:
+ plt:
+url:
+ main:
+fmt:
+ date:
+ list_date:
+ list_sep_date:
+... \ No newline at end of file
diff --git a/src/pyssg/plt/page.html b/src/pyssg/plt/page.html
index 39101c4..d7f5e43 100644
--- a/src/pyssg/plt/page.html
+++ b/src/pyssg/plt/page.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<base href="{{config['url']['static']}}">
- <title>{{page.title}} -- {{config['info']['title']}}</title>
+ <title>{{page.title}} -- {{config['title']}}</title>
</head>
<body>
<h1>{{page.title}}</h1>
diff --git a/src/pyssg/plt/rss.xml b/src/pyssg/plt/rss.xml
index 31abd48..6a3eb00 100644
--- a/src/pyssg/plt/rss.xml
+++ b/src/pyssg/plt/rss.xml
@@ -3,7 +3,7 @@
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
- <title>{{config['info']['title']}}</title>
+ <title>{{config['title']}}</title>
<link>{{config['url']['main']}}</link>
<atom:link href="{{config['url']['main']}}/rss.xml" rel="self" type="application/rss+xml"/>
<description>Short site description.</description>
@@ -19,7 +19,7 @@
<ttl>30</ttl>
<image>
<url>{{config['url']['static']}}/images/blog.png</url>
- <title>{{config['info']['title']}}</title>
+ <title>{{config['title']}}</title>
<link>{{config['url']['main']}}</link>
</image>
{%for p in all_pages%}
diff --git a/src/pyssg/plt/static_config.yaml b/src/pyssg/plt/static_config.yaml
new file mode 100644
index 0000000..745c767
--- /dev/null
+++ b/src/pyssg/plt/static_config.yaml
@@ -0,0 +1,8 @@
+%YAML 1.2
+---
+fmt:
+ rss_date: "%a, %d %b %Y %H:%M:%S GMT"
+ sitemap_date: "%Y-%m-%d"
+info:
+ version: "0.0.0"
+... \ No newline at end of file
diff --git a/src/pyssg/plt/tag.html b/src/pyssg/plt/tag.html
index eadfb95..59cbdf1 100644
--- a/src/pyssg/plt/tag.html
+++ b/src/pyssg/plt/tag.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<base href="{{config['url']['static']}}">
- <title>Posts filtered by {{tag[0]}} -- {{config['info']['title']}}</title>
+ <title>Posts filtered by {{tag[0]}} -- {{config['title']}}</title>
</head>
<body>
<h1>Posts filtered by {{tag[0]}}</h1>