diff --git a/.gitignore b/.gitignore index 53eae4f..56fa0a7 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,6 @@ mijnblog-test-* *.o *.obj *.lst -articles/ -pages/ -projects/ +/articles/ +/pages/ +/projects/ diff --git a/views/pages/article-list.dt b/views/pages/article-list.dt new file mode 100644 index 0000000..03e6662 --- /dev/null +++ b/views/pages/article-list.dt @@ -0,0 +1,25 @@ +extends parts/page + +block header + title Posts - Netsoj.nl + +block sidebar + +block content + header + h1.title Post list + - import vibe.d; + - if (articleList.length == 0) + p No posts found + - else + - import utils; + - foreach(article; articleList) + article + header + a(href="/posts/#{article.slug}", rel="bookmark") + h2.title #{article.title} + p.subtitle + | By #{article.author} on #{article.firstPublished.toHumanString} + - if (article.firstPublished != article.updated) + |, updated on #{article.updated.toHumanString} + p #{article.excerpt}… diff --git a/views/pages/article.dt b/views/pages/article.dt new file mode 100644 index 0000000..a919a25 --- /dev/null +++ b/views/pages/article.dt @@ -0,0 +1,25 @@ +extends parts/page + +block meta_data + - page_type = "article"; + - page_title = content.title; + - page_url = "/post/" ~ content.slug; + - page_description = content.excerpt; + +block extra_meta_data + meta(name="og:article:author:username", content=content.author) + meta(name="og:article:published_time", content=content.firstPublished.toISOExtString) + - if (content.isModified) + meta(name="og:article:modified_time", content=content.updated.toISOExtString) + +block content + article(itemscope, itemtype="https://schema.org/BlogPosting") + - import utils; + header + h1.title(itemprop="headline") #{content.title} + p.subtitle + | By + | on + - if (content.isModified) + |, updated on + section(itemprop="articleBody") !{content.content} diff --git a/views/pages/error.dt b/views/pages/error.dt new file mode 100644 index 0000000..40c47a8 --- /dev/null +++ b/views/pages/error.dt @@ -0,0 +1,11 @@ +extends parts/page + +block header + title #{error.message} - Netsoj.nl + +block sidebar + +block content + header + h1.title #{error.message} (#{error.code}) + pre #{error.debugMessage}