From 135c6380ad381762c89276bed4b8736e235529ff Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado <david@luevano.xyz> Date: Fri, 4 Jun 2021 22:18:12 -0600 Subject: move plt dir to be included in data --- ChangeLog | 1 + plt/index.html | 32 -------------------------------- plt/page.html | 25 ------------------------- plt/rss.xml | 39 --------------------------------------- plt/sitemap.xml | 22 ---------------------- plt/tag.html | 26 -------------------------- pyssgrc | 2 +- src/pyssg/plt/index.html | 32 ++++++++++++++++++++++++++++++++ src/pyssg/plt/page.html | 25 +++++++++++++++++++++++++ src/pyssg/plt/rss.xml | 39 +++++++++++++++++++++++++++++++++++++++ src/pyssg/plt/sitemap.xml | 22 ++++++++++++++++++++++ src/pyssg/plt/tag.html | 26 ++++++++++++++++++++++++++ 12 files changed, 146 insertions(+), 145 deletions(-) delete mode 100644 plt/index.html delete mode 100644 plt/page.html delete mode 100644 plt/rss.xml delete mode 100644 plt/sitemap.xml delete mode 100644 plt/tag.html create mode 100644 src/pyssg/plt/index.html create mode 100644 src/pyssg/plt/page.html create mode 100644 src/pyssg/plt/rss.xml create mode 100644 src/pyssg/plt/sitemap.xml create mode 100644 src/pyssg/plt/tag.html diff --git a/ChangeLog b/ChangeLog index a51fb5a..f6e6eb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ CHANGES ======= +* refactor and add support for jinija * just include changelog v0.4.1 diff --git a/plt/index.html b/plt/index.html deleted file mode 100644 index c96db3b..0000000 --- a/plt/index.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <base href="{{site_base_static_url}}"> - <title>Index -- {{site_title}}</title> - </head> - <body> - <h1>Index -- {{site_title}}</h1> - <p>Some text here.</p> - - <p>Tags: - {%for t in all_tags%} - <a href="{{t[1]}}">{{t[0]}}</a>{{", " if not loop.last else ""}} - {%endfor%} - </p> - - <h2>Articles</h2> - <ul> - {%for p in all_pages%} - {%if loop.previtem%} - {%if loop.previtem.cdate_list_sep !=p.cdate_list_sep%} - <h3>{{p.cdate_list_sep}}</h3> - {%endif%} - {%else%} - <h3>{{p.cdate_list_sep}}</h3> - {%endif%} - <li>{{p.cdate_list}} - <a href="{{p.url}}">{{p.title}}</a></li> - {%endfor%} - </ul> - </body> -</html> diff --git a/plt/page.html b/plt/page.html deleted file mode 100644 index fefaaa6..0000000 --- a/plt/page.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html lang="{{page.lang}}"> - <head> - <meta charset="utf-8"> - <base href="{{site_base_static_url}}"> - <title>{{page.title}} -- {{site_title}}</title> - </head> - <body> - <h1>{{page.title}}</h1> - <p>By {{page.author}}</p> - <p>Created: {{page.cdate}}</p> - {%if page.mdate is not none%} - <p>Modified: {{page.mdate}}</p> - {%endif%} - - {{page.content}} - - <p>Tags: - {%for t in page.tags%} - <a href="{{t[1]}}">{{t[0]}}</a>{{", " if not loop.last else ""}} - {%endfor%} - </p> - </body> -</html> - diff --git a/plt/rss.xml b/plt/rss.xml deleted file mode 100644 index 99b2b49..0000000 --- a/plt/rss.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<rss version="2.0" - xmlns:atom="http://www.w3.org/2005/Atom" - xmlns:content="http://purl.org/rss/1.0/modules/content/"> - <channel> - <title>{{site_title}}</title> - <link>{{site_base_url}}</link> - <atom:link href="{{site_base_url}}/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>{{run_date}}</pubDate> - <lastBuildDate>{{run_date}}</lastBuildDate> - <generator>pyssg v{{pyssg_version}}</generator> - <docs>https://validator.w3.org/feed/docs/rss2.html</docs> - <ttl>30</ttl> - <image> - <url>{{site_base_static_url}}/images/blog.png</url> - <title>{{site_title}}</title> - <link>{{site_base_url}}</link> - </image> - {%for p in all_pages%} - <item> - <title>{{p.title}}</title> - <link>{{p.url}}</link> - <guid isPermaLink="true">{{p.url}}</guid> - <pubDate>{{p.cdate_rss}}</pubDate> - {%for t in p.tags%} - <category>{{t[0]}}</category> - {%endfor%} - <description>{{p.summary}}</description> - <content:decoded><![CDATA[{{p.content}}]]></content:decoded> - </item> - {%endfor%} - </channel> -</rss> diff --git a/plt/sitemap.xml b/plt/sitemap.xml deleted file mode 100644 index a5b5404..0000000 --- a/plt/sitemap.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> - {%for p in all_pages%} - <url> - <loc>{{p.url}}</loc> - <lastmod>{{p.mdate_sitemap if p.mdate_sitemap else p.cdate_sitemap}}</lastmod> - <changefreq>weekly</changefreq> - <priority>1.0</priority> - </url> - {%endfor%} - - {%for t in all_tags%} - <url> - <loc>{{t[1]}}</loc> - <lastmod>{{run_date}}</lastmod> - <changefreq>daily</changefreq> - <priority>0.5</priority> - </url> - {%endfor%} -</urlset> diff --git a/plt/tag.html b/plt/tag.html deleted file mode 100644 index 2fdc27b..0000000 --- a/plt/tag.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <base href="{{site_base_static_url}}"> - <title>Posts filtered by {{tag[0]}} -- {{site_title}}</title> - </head> - <body> - <h1>Posts filtered by {{tag[0]}}</h1> - <p>Some text here.</p> - - <h2>Articles</h2> - <ul> - {%for p in tag_pages%} - {%if loop.previtem%} - {%if loop.previtem.cdate_list_sep !=p.cdate_list_sep%} - <h3>{{p.cdate_list_sep}}</h3> - {%endif%} - {%else%} - <h3>{{p.cdate_list_sep}}</h3> - {%endif%} - <li>{{p.cdate_list}} - <a href="{{p.url}}">{{p.title}}</a></li> - {%endfor%} - </ul> - </body> -</html> diff --git a/pyssgrc b/pyssgrc index 2e8f895..96e77f4 100644 --- a/pyssgrc +++ b/pyssgrc @@ -1,6 +1,6 @@ SRC_PATH=e_src DST_PATH=e_dst -PLT_PATH=plt +PLT_PATH=src/pyssg/plt BASE_URL=https://blog.luevano.xyz BASE_STATIC_URL=https://static.luevano.xyz TITLE=Luévano's Blog diff --git a/src/pyssg/plt/index.html b/src/pyssg/plt/index.html new file mode 100644 index 0000000..c96db3b --- /dev/null +++ b/src/pyssg/plt/index.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <base href="{{site_base_static_url}}"> + <title>Index -- {{site_title}}</title> + </head> + <body> + <h1>Index -- {{site_title}}</h1> + <p>Some text here.</p> + + <p>Tags: + {%for t in all_tags%} + <a href="{{t[1]}}">{{t[0]}}</a>{{", " if not loop.last else ""}} + {%endfor%} + </p> + + <h2>Articles</h2> + <ul> + {%for p in all_pages%} + {%if loop.previtem%} + {%if loop.previtem.cdate_list_sep !=p.cdate_list_sep%} + <h3>{{p.cdate_list_sep}}</h3> + {%endif%} + {%else%} + <h3>{{p.cdate_list_sep}}</h3> + {%endif%} + <li>{{p.cdate_list}} - <a href="{{p.url}}">{{p.title}}</a></li> + {%endfor%} + </ul> + </body> +</html> diff --git a/src/pyssg/plt/page.html b/src/pyssg/plt/page.html new file mode 100644 index 0000000..fefaaa6 --- /dev/null +++ b/src/pyssg/plt/page.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html lang="{{page.lang}}"> + <head> + <meta charset="utf-8"> + <base href="{{site_base_static_url}}"> + <title>{{page.title}} -- {{site_title}}</title> + </head> + <body> + <h1>{{page.title}}</h1> + <p>By {{page.author}}</p> + <p>Created: {{page.cdate}}</p> + {%if page.mdate is not none%} + <p>Modified: {{page.mdate}}</p> + {%endif%} + + {{page.content}} + + <p>Tags: + {%for t in page.tags%} + <a href="{{t[1]}}">{{t[0]}}</a>{{", " if not loop.last else ""}} + {%endfor%} + </p> + </body> +</html> + diff --git a/src/pyssg/plt/rss.xml b/src/pyssg/plt/rss.xml new file mode 100644 index 0000000..99b2b49 --- /dev/null +++ b/src/pyssg/plt/rss.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<rss version="2.0" + xmlns:atom="http://www.w3.org/2005/Atom" + xmlns:content="http://purl.org/rss/1.0/modules/content/"> + <channel> + <title>{{site_title}}</title> + <link>{{site_base_url}}</link> + <atom:link href="{{site_base_url}}/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>{{run_date}}</pubDate> + <lastBuildDate>{{run_date}}</lastBuildDate> + <generator>pyssg v{{pyssg_version}}</generator> + <docs>https://validator.w3.org/feed/docs/rss2.html</docs> + <ttl>30</ttl> + <image> + <url>{{site_base_static_url}}/images/blog.png</url> + <title>{{site_title}}</title> + <link>{{site_base_url}}</link> + </image> + {%for p in all_pages%} + <item> + <title>{{p.title}}</title> + <link>{{p.url}}</link> + <guid isPermaLink="true">{{p.url}}</guid> + <pubDate>{{p.cdate_rss}}</pubDate> + {%for t in p.tags%} + <category>{{t[0]}}</category> + {%endfor%} + <description>{{p.summary}}</description> + <content:decoded><![CDATA[{{p.content}}]]></content:decoded> + </item> + {%endfor%} + </channel> +</rss> diff --git a/src/pyssg/plt/sitemap.xml b/src/pyssg/plt/sitemap.xml new file mode 100644 index 0000000..a5b5404 --- /dev/null +++ b/src/pyssg/plt/sitemap.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> + {%for p in all_pages%} + <url> + <loc>{{p.url}}</loc> + <lastmod>{{p.mdate_sitemap if p.mdate_sitemap else p.cdate_sitemap}}</lastmod> + <changefreq>weekly</changefreq> + <priority>1.0</priority> + </url> + {%endfor%} + + {%for t in all_tags%} + <url> + <loc>{{t[1]}}</loc> + <lastmod>{{run_date}}</lastmod> + <changefreq>daily</changefreq> + <priority>0.5</priority> + </url> + {%endfor%} +</urlset> diff --git a/src/pyssg/plt/tag.html b/src/pyssg/plt/tag.html new file mode 100644 index 0000000..2fdc27b --- /dev/null +++ b/src/pyssg/plt/tag.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <base href="{{site_base_static_url}}"> + <title>Posts filtered by {{tag[0]}} -- {{site_title}}</title> + </head> + <body> + <h1>Posts filtered by {{tag[0]}}</h1> + <p>Some text here.</p> + + <h2>Articles</h2> + <ul> + {%for p in tag_pages%} + {%if loop.previtem%} + {%if loop.previtem.cdate_list_sep !=p.cdate_list_sep%} + <h3>{{p.cdate_list_sep}}</h3> + {%endif%} + {%else%} + <h3>{{p.cdate_list_sep}}</h3> + {%endif%} + <li>{{p.cdate_list}} - <a href="{{p.url}}">{{p.title}}</a></li> + {%endfor%} + </ul> + </body> +</html> -- cgit v1.2.3-70-g09d2