diff options
Diffstat (limited to 'src/pyssg/plt')
-rw-r--r-- | src/pyssg/plt/default.ini | 22 | ||||
-rw-r--r-- | src/pyssg/plt/index.html | 6 | ||||
-rw-r--r-- | src/pyssg/plt/page.html | 4 | ||||
-rw-r--r-- | src/pyssg/plt/rss.xml | 18 | ||||
-rw-r--r-- | src/pyssg/plt/sitemap.xml | 2 | ||||
-rw-r--r-- | src/pyssg/plt/tag.html | 4 |
6 files changed, 29 insertions, 27 deletions
diff --git a/src/pyssg/plt/default.ini b/src/pyssg/plt/default.ini index 2700d28..ab4eac1 100644 --- a/src/pyssg/plt/default.ini +++ b/src/pyssg/plt/default.ini @@ -1,14 +1,16 @@ -[dir_paths] +[path] src=src dst=dst plt=plt -[urls] -url=https://example.com -static_url=https://static.example.com -default_image_url=/images/default.png -[formats] -date_format=%%a, %%b %%d, %%Y @ %%H:%%M %%Z -list_date_format=%%b %%d -list_sep_date_format=%%B %%Y +[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
\ No newline at end of file +title=Example site +[other] +force=False
\ No newline at end of file diff --git a/src/pyssg/plt/index.html b/src/pyssg/plt/index.html index e06efdb..09ca786 100644 --- a/src/pyssg/plt/index.html +++ b/src/pyssg/plt/index.html @@ -2,11 +2,11 @@ <html lang="en"> <head> <meta charset="utf-8"> - <base href="{{config.static_url}}"> - <title>Index -- {{config.title}}</title> + <base href="{{config.get('url', 'static')}}"> + <title>Index -- {{config.get('info', 'title')}}</title> </head> <body> - <h1>Index -- {{config.title}}</h1> + <h1>Index -- {{config.get('info', 'title')}}</h1> <p>Some text here.</p> <p>Tags: diff --git a/src/pyssg/plt/page.html b/src/pyssg/plt/page.html index 2fc3943..15663fa 100644 --- a/src/pyssg/plt/page.html +++ b/src/pyssg/plt/page.html @@ -2,8 +2,8 @@ <html lang="{{page.lang}}"> <head> <meta charset="utf-8"> - <base href="{{config.static_url}}"> - <title>{{page.title}} -- {{config.title}}</title> + <base href="{{config.get('url', 'static')}}"> + <title>{{page.title}} -- {{config.get('info', 'title')}}</title> </head> <body> <h1>{{page.title}}</h1> diff --git a/src/pyssg/plt/rss.xml b/src/pyssg/plt/rss.xml index 42020d7..be6ddf0 100644 --- a/src/pyssg/plt/rss.xml +++ b/src/pyssg/plt/rss.xml @@ -3,24 +3,24 @@ xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <channel> - <title>{{config.title}}</title> - <link>{{config.url}}</link> - <atom:link href="{{config.url}}/rss.xml" rel="self" type="application/rss+xml"/> + <title>{{config.get('info', 'title')}}</title> + <link>{{config.get('url', 'main')}}</link> + <atom:link href="{{config.get('url', 'main')}}/rss.xml" rel="self" type="application/rss+xml"/> <description>Short site description.</description> <language>en-us</language> <category>Blog</category> <copyright>Copyright 2021 Somebody</copyright> <managingEditor>some@one.com (Sombody)</managingEditor> <webMaster>some@one.com (Sombody)</webMaster> - <pubDate>{{config.run_date_rss}}</pubDate> - <lastBuildDate>{{run_date_rss}}</lastBuildDate> - <generator>pyssg v{{config.version}}</generator> + <pubDate>{{config.get('info', 'rss_run_date')}}</pubDate> + <lastBuildDate>{{config.get('info', 'rss_run_date')}}</lastBuildDate> + <generator>pyssg v{{config.get('info', 'version')}}</generator> <docs>https://validator.w3.org/feed/docs/rss2.html</docs> <ttl>30</ttl> <image> - <url>{{config.static_url}}/images/blog.png</url> - <title>{{config.title}}</title> - <link>{{config.url}}</link> + <url>{{config.get('url', 'static')}}/images/blog.png</url> + <title>{{config.get('info', 'title')}}</title> + <link>{{config.get('url', 'main')}}</link> </image> {%for p in all_pages%} <item> diff --git a/src/pyssg/plt/sitemap.xml b/src/pyssg/plt/sitemap.xml index 26ee5c1..af1212a 100644 --- a/src/pyssg/plt/sitemap.xml +++ b/src/pyssg/plt/sitemap.xml @@ -14,7 +14,7 @@ {%for t in all_tags%} <url> <loc>{{t[1]}}</loc> - <lastmod>{{config.run_date_sitemap}}</lastmod> + <lastmod>{{config.get('info', 'sitemap_run_date')}}</lastmod> <changefreq>daily</changefreq> <priority>0.5</priority> </url> diff --git a/src/pyssg/plt/tag.html b/src/pyssg/plt/tag.html index d856ce4..ffd1956 100644 --- a/src/pyssg/plt/tag.html +++ b/src/pyssg/plt/tag.html @@ -2,8 +2,8 @@ <html lang="en"> <head> <meta charset="utf-8"> - <base href="{{config.static_url}}"> - <title>Posts filtered by {{tag[0]}} -- {{config.title}}</title> + <base href="{{config.get('url', 'static')}}"> + <title>Posts filtered by {{tag[0]}} -- {{config.get('info', 'title')}}</title> </head> <body> <h1>Posts filtered by {{tag[0]}}</h1> |