diff options
author | terminaldweller <thabogre@gmail.com> | 2022-07-06 13:34:45 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-07-06 13:34:45 +0000 |
commit | da98e1dee68e421bdd7cfcf332c43a1f94a43a30 (patch) | |
tree | 792f70ee92e096d69d9989481a736ff3af0590c7 /views | |
parent | was using node image for self-signed certificates (diff) | |
parent | fix for atom (diff) | |
download | blog-da98e1dee68e421bdd7cfcf332c43a1f94a43a30.tar.gz blog-da98e1dee68e421bdd7cfcf332c43a1f94a43a30.zip |
Merge branch 'rss'
Diffstat (limited to '')
-rw-r--r-- | views/archive.ejs | 4 | ||||
-rw-r--r-- | views/index.ejs | 13 | ||||
-rw-r--r-- | views/rss_feed.pug | 21 | ||||
-rw-r--r-- | views/rss_feed_v2.pug | 22 |
4 files changed, 57 insertions, 3 deletions
diff --git a/views/archive.ejs b/views/archive.ejs index 36191de..72b963d 100644 --- a/views/archive.ejs +++ b/views/archive.ejs @@ -9,9 +9,9 @@ <body> <script>0</script> <div class="article"> - <% data.mds.forEach(function(md) { %> + <% data.blogPosts.forEach(function(blogPost) { %> <ul> - <li><a href=<%= "/mds/"+md %> target="_self" rel="noreferrer noopener" type="text/html"><%= md %></a></li> + <li><a href=<%= "/posts/"+blogPost.slug %> target="_self" rel="noreferrer noopener" type="text/html"><%= blogPost.title %></a></li> </ul> <% }) %> </div> diff --git a/views/index.ejs b/views/index.ejs index 4679e4a..fdd49cc 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -5,16 +5,27 @@ <meta name="viewport" content="width=device-width"> <title>Blog</title> <link rel="stylesheet" href="/master.css" type="text/css" media="screen" title="no title" charset="utf-8"> + <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/feed"> + <!-- <link rel="alternate" type="application/atom+xml" title="RSS" href="/feed/rss"> --> </head> <body> - <script>0</script> + <!-- <script>0</script> --> <div class="article"> <%- data.blogHttp %> <br/> <hr/> <br/> + <a class="left-footer">Keywords:</a> + <%- data.keywords %> + <%- data.lastUpdated %> + <br/> + <br/> + <hr/> + <br/> <a href="/archive" class="left-footer">Archive</a> <a href="/about" class="right-footer">About</a> + <a class="right-footer">   </a> + <a href="/rss/feed" class="right-footer">RSS</a> </div> </body> </html> diff --git a/views/rss_feed.pug b/views/rss_feed.pug new file mode 100644 index 0000000..e75225d --- /dev/null +++ b/views/rss_feed.pug @@ -0,0 +1,21 @@ +doctype xml +rss(version='2.0', xmlns:atom='<a href="http://www.w3.org/2005/Atom" rel="nofollow">http://www.w3.org/2005/Atom</a>') + channel + title deviblog + link <a href="https://blog.terminaldweller.com" rel="nofollow">https://blog.terminaldweller.com</a> + atom:link(href='<a href="https://blog.terminaldweller.com/feed/rss" rel="nofollow">https://blog.terminaldweller.com/feed/rss</a>', rel='self', type='application/rss+xml') + description I talk about software here. + language en-US + if posts.length + lastBuildDate= new Date(posts[0].lastUpdatedAt).toUTCString() + each post in posts + item + title= post.title + link <a href="https://blog.terminaldweller.com/blog/#{post.slug}" rel="nofollow">https://terminaldweller.com/blog/#{post.slug}</a> + description + | <![CDATA[ + | !{post.teaser} + p: a(href='<a href="https://blog.terminaldweller.com/blog/#{post.slug} rel="nofollow">https://blog.terminaldweller.com/blog/#{post.slug}</a>') 'Read more »' + | ]]> + pubDate= new Date(post.lastUpdatedAt).toUTCString() + guid(isPermaLink='false') <a href="https://blog.terminaldweller.com/blog/#{post.slug}" rel="nofollow">https://blog.terminaldweller.com/blog/#{post.slug}</a> diff --git a/views/rss_feed_v2.pug b/views/rss_feed_v2.pug new file mode 100644 index 0000000..d04297d --- /dev/null +++ b/views/rss_feed_v2.pug @@ -0,0 +1,22 @@ +doctype xml +rss(version='2.0', xmlns:atom='http://www.w3.org/2005/Atom') + channel + title deviblog + link https://blog.terminaldweller.com + atom:link(href='https://blog.terminaldweller.com/rss/feed', rel='self', type='application/rss+xml') + description I talk about software here. + managingEditor devi@terminaldweller.com (Farzad Sadeghi) + webMaster devi@terminaldweller.com (Farzad Sadeghi) + language en-US + if posts.length + lastBuildDate= new Date(posts[0].lastUpdatedAt).toUTCString() + each post in posts + item + title= post.title + link https://blog.terminaldweller.com/posts/#{post.slug} + description + | <![CDATA[ + | #{post.teaser} + | ]]> + pubDate= new Date(post.lastUpdatedAt).toUTCString() + guid(isPermaLink='false') https://blog.terminaldweller.com/blog/#{post.slug} |