@bender@twtxt.net I should put the template that is used by default as a file in the repo. Look at the source for now and you’ll see 😅
@prologic@twtxt.net ah! Something like this:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>{{ .Title }}</title>
</head>
<body class="preload">
<main class="container">
{{ range $_, $twt := $.Twts }}
<article id="{{ $twt.Hash }}" class="h-entry">
<div class="u-author h-card">
<div class="dt-publish">
<a class="u-url" href="#{{ $twt.Hash }}">
<time class="dt-published" datetime="{{ $twt.Created | date "2006-01-02T15:04:05Z07:00" }}">
{{ $twt.Created }}
</time>
</a>
<span> {{ $twt.Created | time }}</span>
<a class="u-search" href="https://search.twtxt.net/twt/{{ $twt.Hash }}">(search)</a>
</div>
</div>
<div class="e-content">
{{ formatTwt $twt }}
</div>
</article>
{{ end }}
</main>
</body>
</html>
How difficult will it be for you to modify this, so that can also spit out individual HTML files named after the twtxt hash, using a similar template?
What’s wrong with the timestamps, @prologic@twtxt.net? See https://aelaraji.com/log.html, all are +0000 UTC+0000
. Same on a local test I am running.
I tried changing {{ $twt.Created | date "2006-01-02T15:04:05Z07:00" }}
to {{ $twt.Created | date "2006-01-02T15:04:05" }}
, but no dice. I don’t really care about the timezone. LOL.
@bender@twtxt.net LOL normally things (in the vanilla template) render like <time class="dt-published" datetime="2024-09-17T15:05:19+01:00"> 2024-09-17 14:05:19 +0000 UTC+0000 </time>
the datetime=...
atribute is in my local time UTC+1 then the text within the tag is in UTC+0
The thing is, I’ve been poking at the template as well, but nothing changes. I literally whole portionsm added in lorem text just to see if it would do anything, then twtxt2html -T ./layout.html <link to twtxt file> | less
shows same thing as before! nothing changes. LOL I’m not sure I’m going at it the right way.
@aelaraji@aelaraji.com this is my change on main.go
(but it can be done on a template now, so no reason to touch the code):
<time class="dt-published" datetime="{{ $twt.Created | date "2006-01-02T15:04:05Z07:00" }}">
{{ $twt.Created | date "2006-01-02 15:04:05 MST" }}
</time>
See https://ferengi.one. I am going to further customise things, but that’s a start.
@bender@twtxt.net that’s not your change, silly robot, it is mine! LOL. I am finding @prologic@twtxt.net’s tool handy to refer to previous posts (as reference, for example).