diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-12-16 17:45:03 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-12-16 17:45:03 -0600 |
commit | 7e49db5ddefe8c515b5f3931a5c701efaac33d91 (patch) | |
tree | d7d1efda44837a466fe079266efda90021812399 /plt/blog | |
parent | 3112a76dac594fe715b59e53c399b0dec5b53193 (diff) |
change structure for new pyssg version
Diffstat (limited to 'plt/blog')
-rw-r--r-- | plt/blog/index.html | 60 | ||||
-rw-r--r-- | plt/blog/page.html | 81 | ||||
-rw-r--r-- | plt/blog/page_list.html | 15 | ||||
-rw-r--r-- | plt/blog/tag.html | 54 |
4 files changed, 210 insertions, 0 deletions
diff --git a/plt/blog/index.html b/plt/blog/index.html new file mode 100644 index 0000000..e9a03cf --- /dev/null +++ b/plt/blog/index.html @@ -0,0 +1,60 @@ +{%extends "base.html"%} + +{%block html_lang%} +{{config['lang']}} +{%endblock html_lang%} + +{%block head_title%} +<title>Index -- {{config['title']}}</title> +{%endblock head_title%} + +{%block head_description%} +<meta name="description" content="{{config['description']}}"/> +{%endblock head_description%} + +{%block head_rss%} +<link rel="alternate" type="application/rss+xml" href="{{config['url']['main']}}/rss.xml" title="{{config['title']}} RSS"> +{%endblock head_rss%} + +{%block head_extra%} +{%endblock head_extra%} + +{%block head_og%} + <meta property="og:title" content="Index -- {{config['title']}}"/> + <meta property="og:type" content="article"/> + <meta property="og:url" content="{{config['url']['main']}}/index.html"/> + <meta property="og:image" content="{{config['url']['static']}}/{{config['url']['default_image']}}"/> + <meta property="og:description" content="{{config['description']}}"/> + <meta property="og:locale" content="{{config['lang']}}"/> + <meta property="og:site_name" content="{{config['title']}}"/> +{%endblock head_og%} + +{%block body_header%} +{%import 'body/header.html' as body_header%} +{{body_header.print(config)}} +{%endblock body_header%} + +{%block body_content%} + <h1>Index -- {{config['title']}}</h1> + + <p>Welcome to my blog where I'll post whatever I please, ranging from rants to how-to's. Además, este pex va a estar en español e inglés porque quiero (no una mezcla en cada entrada, pero sí entradas completas en diferentes lenguajes).</p> + + <p>Get the RSS feed: <a target="_blank" href="{{config['url']['main']}}/rss.xml">{{config['url']['main']}}/rss.xml</a></p> + + {%import "tag_list.html" as tag_list%} + {{tag_list.print(all_tags, "article-tags")}} + + {%import "blog/page_list.html" as page_list%} + {{page_list.print("Articles", all_pages)}} +{%endblock body_content%} + +{%block body_footer%} +{%import 'body/footer.html' as body_footer%} +{{body_footer.contact(config)}} +{{body_footer.donate(config)}} +{{body_footer.rss(config)}} +<br> +{{body_footer.created_with()}} +<br> +{{body_footer.copyright()}} +{%endblock body_footer%}
\ No newline at end of file diff --git a/plt/blog/page.html b/plt/blog/page.html new file mode 100644 index 0000000..71b4cfe --- /dev/null +++ b/plt/blog/page.html @@ -0,0 +1,81 @@ +{%extends "base.html"%} + +{%block html_lang%} +{{config['lang']}} +{%endblock html_lang%} + +{%block head_title%} +<title>{{page.title}} -- {{config['title']}}</title> +{%endblock head_title%} + +{%block head_description%} +{%if page.summary is not none%} + <meta name="description" content="{{page.summary}}"/> +{%else%} + <meta name="description" content="{{config['description']}}"/> +{%endif%} +{%endblock head_description%} + +{%block head_rss%} +<link rel="alternate" type="application/rss+xml" href="{{config['url']['main']}}/rss.xml" title="{{config['title']}} RSS"> +{%endblock head_rss%} + +{%block head_extra%} +{%import "highlightjs.html" as hljs%} +{{hljs.print()}} +{%endblock head_extra%} + +{%block gdscript_hl%} +<!-- Specific to GDScript --> +<script type="text/javascript" src="hl/languages/gdscript.min.js"></script> +{%endblock gdscript_hl%} + +{%block head_og%} + <meta property="og:title" content="{{page.title}} -- {{config['title']}}"/> + <meta property="og:type" content="article"/> + <meta property="og:url" content="{{config['url']['main']}}/{{page.name}}"/> + <meta property="og:image" content="{{config['url']['static']}}/{{config['url']['default_image']}}"/> +{%if page.summary is not none%} + <meta property="og:description" content="{{page.summary}}"/> +{%else%} + <meta property="og:description" content="{{config['description']}}"/> +{%endif%} + <meta property="og:locale" content="{{config['lang']}}"/> + <meta property="og:site_name" content="{{config['title']}}"/> +{%endblock head_og%} + +{%block body_header%} +{%import 'body/header.html' as body_header%} +{{body_header.print(config)}} +{%endblock body_header%} + +{%block body_content%} + <h1>{{page.title}}</h1> + + {{page.content}} + + {%import "page_nav.html" as page_nav%} + {{page_nav.print(page, config, "page-nav")}} + + <hr> + <div class="article-info"> + <p>By {{', '.join(page.author)}}</p> + <p>Created: {{page.cdate}}</p> + {%if page.mdate is not none%} + <p>Modified: {{page.mdate}}</p> + {%endif%} + {%import "tag_list.html" as tag_list%} + {{tag_list.print(page.tags, "article-tags")}} + </div> +{%endblock body_content%} + +{%block body_footer%} +{%import 'body/footer.html' as body_footer%} +{{body_footer.contact(config)}} +{{body_footer.donate(config)}} +{{body_footer.rss(config)}} +<br> +{{body_footer.created_with()}} +<br> +{{body_footer.copyright()}} +{%endblock body_footer%}
\ No newline at end of file diff --git a/plt/blog/page_list.html b/plt/blog/page_list.html new file mode 100644 index 0000000..b818884 --- /dev/null +++ b/plt/blog/page_list.html @@ -0,0 +1,15 @@ +{%macro print(name, pages)%} + <h2>{{name}}</h2> + <ul class="page-list"> + {%for p in 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> +{%endmacro%} diff --git a/plt/blog/tag.html b/plt/blog/tag.html new file mode 100644 index 0000000..ec826bf --- /dev/null +++ b/plt/blog/tag.html @@ -0,0 +1,54 @@ +{%extends "base.html"%} + +{%block html_lang%} +{{config['lang']}} +{%endblock html_lang%} + +{%block head_title%} +<title>Posts filtered by {{tag[0]}} -- {{config['title']}}</title> +{%endblock head_title%} + +{%block head_description%} +<meta name="description" content="Posts filtered by {{tag[0]}}"/> +{%endblock head_description%} + +{%block head_rss%} +<link rel="alternate" type="application/rss+xml" href="{{config['url']['main']}}/rss.xml" title="{{config['title']}} RSS"> +{%endblock head_rss%} + +{%block head_extra%} +{%endblock head_extra%} + +{%block head_og%} + <meta property="og:title" content="{{config['title']}}"/> + <meta property="og:type" content="article"/> + <meta property="og:url" content="{{tag[1]}}"/> + <meta property="og:image" content="{{config['url']['static']}}/{{config['url']['default_image']}}"/> + <meta property="og:description" content="Posts filtered by {{tag[0]}}"/> + <meta property="og:locale" content="{{config['lang']}}"/> + <meta property="og:site_name" content="{{config['title']}}"/> +{%endblock head_og%} + +{%block body_header%} +{%import 'body/header.html' as body_header%} +{{body_header.print(config)}} +{%endblock body_header%} + +{%block body_content%} + <h1>Posts filtered by {{tag[0]}}</h1> + + {%import "blog/page_list.html" as page_list%} + {{page_list.print("Articles", tag_pages)}} + +{%endblock body_content%} + +{%block body_footer%} +{%import 'body/footer.html' as body_footer%} +{{body_footer.contact(config)}} +{{body_footer.donate(config)}} +{{body_footer.rss(config)}} +<br> +{{body_footer.created_with()}} +<br> +{{body_footer.copyright()}} +{%endblock body_footer%}
\ No newline at end of file |