diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-10-02 15:15:08 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-10-02 15:15:08 -0400 |
| commit | 2f333da4919ee71b94a0086aef47e4357b7d8135 (patch) | |
| tree | 93546e7c1cb831446237c664451e39bd505ace1d | |
| parent | 55a6485b7ffc6a07f0d5f5c042806d9fd2c44857 (diff) | |
| download | xesite-2f333da4919ee71b94a0086aef47e4357b7d8135.tar.xz xesite-2f333da4919ee71b94a0086aef47e4357b7d8135.zip | |
bring back argv[0]
Signed-off-by: Xe Iaso <me@xeiaso.net>
| -rw-r--r-- | internal/lume/lume.go | 3 | ||||
| -rw-r--r-- | lume/src/_data/.gitignore | 1 | ||||
| -rw-r--r-- | lume/src/_includes/base.njk | 2 | ||||
| -rw-r--r-- | templates/blog_atom.rs.xml | 28 | ||||
| -rw-r--r-- | templates/blog_rss.rs.xml | 24 | ||||
| -rw-r--r-- | templates/mara.rs.html | 11 |
6 files changed, 4 insertions, 65 deletions
diff --git a/internal/lume/lume.go b/internal/lume/lume.go index 294f42c..7bee446 100644 --- a/internal/lume/lume.go +++ b/internal/lume/lume.go @@ -160,7 +160,7 @@ func New(ctx context.Context, o *Options) (*FS, error) { if o.MiToken != "" { fs.miClient = mi.New(o.MiToken, "xeiaso.net/v4/internal/lume "+os.Args[0]) - slog.Info("mi integration enabled") + slog.Debug("mi integration enabled") } conf, err := config.Load(filepath.Join(fs.repoDir, "config.dhall")) @@ -318,6 +318,7 @@ func (f *FS) writeConfig() error { } for fname, data := range map[string]any{ + "argv.json": os.Args, "authors.json": f.conf.Authors, "characters.json": f.conf.Characters, "contactLinks.json": f.conf.ContactLinks, diff --git a/lume/src/_data/.gitignore b/lume/src/_data/.gitignore index fd3c0c6..773657a 100644 --- a/lume/src/_data/.gitignore +++ b/lume/src/_data/.gitignore @@ -1,3 +1,4 @@ +argv.json authors.json characters.json contactLinks.json diff --git a/lume/src/_includes/base.njk b/lume/src/_includes/base.njk index 0dc9672..bc53ca3 100644 --- a/lume/src/_includes/base.njk +++ b/lume/src/_includes/base.njk @@ -160,7 +160,7 @@ la budza pu cusku lu href="https://patreon.com/cadey">Patreon</a> like <a href="/patrons">these awesome people</a>!</p> </div> <div class="flex items-center justify-center border-fg-3 dark:border-fgDark-3 lg:justify-between"> - <p>Served by xesite v4, source code available <a href="https://github.com/Xe/site">here</a>.</p> + <p>Served by xesite v4 ({{argv[0]}}), source code available <a href="https://github.com/Xe/site">here</a>.</p> </div> </footer> </body>
\ No newline at end of file diff --git a/templates/blog_atom.rs.xml b/templates/blog_atom.rs.xml deleted file mode 100644 index 4882858..0000000 --- a/templates/blog_atom.rs.xml +++ /dev/null @@ -1,28 +0,0 @@ -@use crate::post::Post; -@use chrono::Utc; - -@(posts: Vec<Post>) - -<?xml version='1.0' encoding='UTF-8'?> -<feed xmlns="http://www.w3.org/2005/Atom"> - <id>https://xeiaso.net/blog.atom</id> - <title>Xe's Blog</title> - <updated>@Utc::now().to_rfc3339()</updated> - <author> - <name>Xe Iaso</name> - <email>me@@xeiaso.net</email> - </author> - <link href="https://xeiaso.net/blog.atom" rel="self"/> - <link href="https://xeiaso.net/blog" rel="alternate"/> - <generator uri="@env!("CARGO_PKG_REPOSITORY")" version="@env!("CARGO_PKG_VERSION")">@env!("CARGO_PKG_NAME")</generator> - @for post in posts { - <entry> - <id>https://xeiaso.net/@post.link</id> - <title>@post.front_matter.title</title> - <published>@post.date.to_rfc3339()</published> - <updated>@post.date.to_rfc3339()</updated> - <content type="html" xml:base="https://xeiaso.net/@post.link"><![CDATA[@Html(post.body_html)]]></content> - <link href="https://xeiaso.net/@post.link" rel="alternate"/> - </entry> - } -</feed> diff --git a/templates/blog_rss.rs.xml b/templates/blog_rss.rs.xml deleted file mode 100644 index 16616a4..0000000 --- a/templates/blog_rss.rs.xml +++ /dev/null @@ -1,24 +0,0 @@ -@use crate::APPLICATION_NAME as APP; -@use crate::post::Post; - -@(posts: Vec<Post>) -<?xml version="1.0" encoding="UTF-8" ?> -<rss version="2.0"> - <channel> - <title>Xe's Blog</title> - <link>https://xeiaso.net/blog</link> - <description>Tech, philosophy and more</description> - <generator>@APP https://github.com/Xe/site</generator> - <ttl>1440</ttl> - @for post in posts { - <item> - <guid>https://xeiaso.net/@post.link</guid> - <title>@post.front_matter.title</title> - <link>https://xeiaso.net/@post.link</link> - <description><![CDATA[@Html(post.body_html)]]></description> - <pubDate>@post.date.to_rfc2822()</pubDate> - </item> - - } - </channel> -</rss> diff --git a/templates/mara.rs.html b/templates/mara.rs.html deleted file mode 100644 index 053d232..0000000 --- a/templates/mara.rs.html +++ /dev/null @@ -1,11 +0,0 @@ -@(mood: &str, character: &str, message: Html<String>) -<div class="conversation"> - <div class="conversation-picture conversation-smol"> - <picture> - <source srcset="https://cdn.xeiaso.net/file/christine-static/stickers/@character.to_lowercase()/@(mood).avif" type="image/avif"> - <source srcset="https://cdn.xeiaso.net/file/christine-static/stickers/@character.to_lowercase()/@(mood).webp" type="image/webp"> - <img src="https://cdn.xeiaso.net/file/christine-static/stickers/@character.to_lowercase()/@(mood).png" alt="@character is @mood"> - </picture> - </div> - <div class="conversation-chat"><<b>@character</b>> @message</div> -</div> |
