fix dates
This commit is contained in:
parent
55c7585e98
commit
cedde935f2
|
@ -40,4 +40,5 @@ mkShell {
|
||||||
SITE_PREFIX = "devel.";
|
SITE_PREFIX = "devel.";
|
||||||
CLACK_SET = "Ashlynn,Terry Davis,Dennis Ritchie";
|
CLACK_SET = "Ashlynn,Terry Davis,Dennis Ritchie";
|
||||||
RUST_LOG = "info";
|
RUST_LOG = "info";
|
||||||
|
GITHUB_SHA = "devel";
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,12 @@ impl PartialOrd for Post {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Post {
|
||||||
|
pub fn detri(&self) -> String {
|
||||||
|
self.date.format("M%m %d %Y").to_string()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn load(dir: &str) -> Result<Vec<Post>> {
|
pub fn load(dir: &str) -> Result<Vec<Post>> {
|
||||||
let mut result: Vec<Post> = vec![];
|
let mut result: Vec<Post> = vec![];
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ self.addEventListener('install', function(event) {
|
||||||
event.waitUntil(preLoad());
|
event.waitUntil(preLoad());
|
||||||
});
|
});
|
||||||
|
|
||||||
const cacheName = "cache-2019-11-01";
|
const cacheName = "cache-xesite-2.0.0";
|
||||||
|
|
||||||
var preLoad = function(){
|
var preLoad = function(){
|
||||||
console.log('[PWA Builder] Install Event processing');
|
console.log('[PWA Builder] Install Event processing');
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<p>
|
<p>
|
||||||
<ul>
|
<ul>
|
||||||
@for post in posts {
|
@for post in posts {
|
||||||
<li>@post.date - <a href="@post.link">@post.front_matter.title</a></li>
|
<li>@post.date.format("%Y-%m-%d") - <a href="@post.link">@post.front_matter.title</a></li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -24,25 +24,25 @@
|
||||||
|
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
@{
|
@{
|
||||||
"@@context": "http://schema.org",
|
"@@context": "http://schema.org",
|
||||||
"@@type": "Article",
|
"@@type": "Article",
|
||||||
"headline": "@post.front_matter.title",
|
"headline": "@post.front_matter.title",
|
||||||
"image": "https://christine.website/static/img/avatar.png",
|
"image": "https://christine.website/static/img/avatar.png",
|
||||||
"url": "https://christine.website/@post.link",
|
"url": "https://christine.website/@post.link",
|
||||||
"datePublished": "@post.date",
|
"datePublished": "@post.date",
|
||||||
"mainEntityOfPage": @{
|
"mainEntityOfPage": @{
|
||||||
"@@type": "WebPage",
|
"@@type": "WebPage",
|
||||||
"@@id": "https://christine.website/@post.link"
|
"@@id": "https://christine.website/@post.link"
|
||||||
@},
|
@},
|
||||||
"author": @{
|
"author": @{
|
||||||
"@@type": "Person",
|
"@@type": "Person",
|
||||||
"name": "Christine Dodrill"
|
"name": "Christine Dodrill"
|
||||||
@},
|
@},
|
||||||
"publisher": @{
|
"publisher": @{
|
||||||
"@@type": "Person",
|
"@@type": "Person",
|
||||||
"name": "Christine Dodrill"
|
"name": "Christine Dodrill"
|
||||||
@}
|
@}
|
||||||
@}
|
@}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@body
|
@body
|
||||||
|
@ -52,6 +52,8 @@
|
||||||
<!-- The button that should be clicked. -->
|
<!-- The button that should be clicked. -->
|
||||||
<button onclick="share_on_mastodon()">Share on Mastodon</button>
|
<button onclick="share_on_mastodon()">Share on Mastodon</button>
|
||||||
|
|
||||||
|
<p>This article was posted on @post.detri(). Facts and circumstances may have changed since publication. Please <a href="/contact">contact me</a> before jumping to conclusions if something seems wrong or unclear.</p>
|
||||||
|
|
||||||
@if post.front_matter.series.is_some() {
|
@if post.front_matter.series.is_some() {
|
||||||
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
|
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
|
@use crate::APPLICATION_NAME as APP;
|
||||||
|
|
||||||
@()
|
@()
|
||||||
</div>
|
</div>
|
||||||
|
<hr />
|
||||||
<footer>
|
<footer>
|
||||||
<blockquote>Copyright 2020 Christine Dodrill. Any and all opinions listed here are my own and not representative of my employers; future, past and present.</blockquote>
|
<blockquote>Copyright 2020 Christine Dodrill. Any and all opinions listed here are my own and not representative of my employers; future, past and present.</blockquote>
|
||||||
<br />
|
|
||||||
<!--<p>Like what you see? Donate on <a href="https://www.patreon.com/cadey">Patreon</a> like <a href="/patrons">these awesome people</a>!</p>-->
|
<!--<p>Like what you see? Donate on <a href="https://www.patreon.com/cadey">Patreon</a> like <a href="/patrons">these awesome people</a>!</p>-->
|
||||||
<p>Looking for someone for your team? Take a look <a href="/signalboost">here</a>.</p>
|
<p>Looking for someone for your team? Take a look <a href="/signalboost">here</a>.</p>
|
||||||
|
<p>Served by @APP running commit @env!("GITHUB_SHA"), see <a href="https://github.com/Xe/site">source code here</a>.</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div class="card cell -4of12 blogpost-card">
|
<div class="card cell -4of12 blogpost-card">
|
||||||
<header class="card-header">@post.front_matter.title</header>
|
<header class="card-header">@post.front_matter.title</header>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<center><p>Posted on @post.date<br /><a href="@post.link"><img src="@post.front_matter.thumb.as_ref().unwrap()" /></a></p></center>
|
<center><p>Posted on @post.date.format("%Y-%m-%d")<br /><a href="@post.link"><img src="@post.front_matter.thumb.as_ref().unwrap()" /></a></p></center>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,8 @@
|
||||||
<!-- The button that should be clicked. -->
|
<!-- The button that should be clicked. -->
|
||||||
<button onclick="share_on_mastodon()">Share on Mastodon</button>
|
<button onclick="share_on_mastodon()">Share on Mastodon</button>
|
||||||
|
|
||||||
|
<p>This artwork was posted on @post.detri().</p>
|
||||||
|
|
||||||
@if post.front_matter.series.is_some() {
|
@if post.front_matter.series.is_some() {
|
||||||
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
|
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<p>
|
<p>
|
||||||
<ul>
|
<ul>
|
||||||
@for post in posts {
|
@for post in posts {
|
||||||
<li>@post.date - <a href="@post.link">@post.front_matter.title</a></li>
|
<li>@post.date.format("%Y-%m-%d") - <a href="@post.link">@post.front_matter.title</a></li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -54,6 +54,8 @@
|
||||||
<!-- The button that should be clicked. -->
|
<!-- The button that should be clicked. -->
|
||||||
<button onclick="share_on_mastodon()">Share on Mastodon</button>
|
<button onclick="share_on_mastodon()">Share on Mastodon</button>
|
||||||
|
|
||||||
|
<p>This article was posted on @post.detri(). Facts and circumstances may have changed since publication. Please <a href="/contact">contact me</a> before jumping to conclusions if something seems wrong or unclear.</p>
|
||||||
|
|
||||||
@if post.front_matter.series.is_some() {
|
@if post.front_matter.series.is_some() {
|
||||||
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
|
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue