social.tchncs.de is one of the many independent Mastodon servers you can use to participate in the fediverse.
A friendly server from Germany – which tends to attract techy people, but welcomes everybody. This is one of the oldest Mastodon instances.

Administered by:

Server stats:

3.8K
active users

#hugo

10 posts9 participants0 posts today
Continued thread

試了幾個主題,最後決定用 Rise 開發的 Diary 主題。因為開發者自己也寫漢字,所以這個主題對漢字支持比較好。

github.com/AmazingRise/hugo-th

只是從 GitHub 直接下載的主題有一個明顯的問題,就是網站 Title 不能正常顯示。檢查之後發現,需要把 head.html 裡面與 Title 有關的設置改成這樣:

<title>{{ if .Page.Title }}{{ .Page.Title }} - {{ end }}{{ .Site.Title }}</title>

主題默認的 <title>{{.Title}}</title> 有問題。

Moments piled up. A Hugo theme ported from SumiMakito/hexo-theme-Journal. - AmazingRise/hugo-theme-diary
GitHubGitHub - AmazingRise/hugo-theme-diary: Moments piled up. A Hugo theme ported from SumiMakito/hexo-theme-Journal.Moments piled up. A Hugo theme ported from SumiMakito/hexo-theme-Journal. - AmazingRise/hugo-theme-diary
Replied in thread

@thomas Nutze gerade mal die Wartezeit beim Frittenfön und zu faul auf englisch zu schreiben.

Mein Blog ist mit #hugo gemacht, was ja auch #markdown habe möchte.
Ich nutze da seit längerem schon Visual Studio Code #vscode. Das hat einen Preview und kann gleich noch #git. Ob es für z. B. Mairmaid-Markdown nativ unterstützt oder ich nen Plugin installiert habe, weiß ich gerade nicht auswendig. Für toml kann ich ein Plugin empfehlen. (1/3)

It feels good in the curent situation to be fully free of any proprietary solution.

#Linux #Debian #FreeBSD on all systems only, own #public #DNS servers on own systems including management.

#Mastodon, #Matrix , #Bridges , #Email , #SOGo #Nextcloud #Owncloud #UnifiedPush #ntfy #HomeAssistant #WebSites mostly done with #Hugo, and far more all self hosted on own systems in the basement or in our housing rack.

Mobiles #GrapheneOS and #LineageOS

Whatever #Trump #Microsoft aso does i dont care

With the update to #Pixelfed 0.12.5, I was finally able to export all my statuses. Before that, there was a hard limit of 500. Even though I only had about 170 posts of my own, all shares and likes and stuff counted into that balance, hence no download for me. Yet.

Now that I got a nice .json file, I used Excel to convert this into a usable table. Yeah, I know, Excel! But LibreCalc doesn’t understand .json and I have to use Microsoft shit at work anyhow. So why not take advantage of that?

The Pixelfed export contains not only texts, but also the URLs for all images. Copy that column of URLs to a text file, push it through WGET et voilà, a directory full of joy.

All I have to do is write a short macro which takes the available info from the spreadsheet and creates separate .md files for use in #Hugo or whatever platform I want to show the images on.

Since I don’t need any Pixelfed-specific functions, I can now close down my two instances. Future images will go to #Friendica and – via another script yet to be written – also to my blog.

Today's accomplishment:

Got #hugo to *actually* include JS correctly depending on page.Store settings from shortcodes.

You can define "shortcodes" in Hugo for things like "insert a video player here". So when I say `{{< video "foo" >}}` it'll insert whatever HTML I've defined for playing the "foo" video. The problem is that most of the interesting things that you can do with shortcodes (video, echarts, mermaid, etc) need Javascript to work. So the usual pattern is that the shortcode template calls something like `{{ .Page.Store.Set "hasMermaid" true }}` and then the include-all-the-Javascript template only includes the JS if `.Page.Store.Get "hasMermaid"` is true, so you don't end up adding extra JS all over the place.

It worked fine for each individual post's page (/post/YYYY/MM/DD/foo/) but not for / or /page/X/. So any time I put a JS-needing shortcode above the fold on a post, it failed to render correctly.

I'm not entirely sure how I broke it, but something about the way I was doing summaries kept .Store from propagating right, so none of the logic that used page.Store.Get(...) thought that the feature was used on the page, so none of the JS was included, breaking charts and video.

Reverting my article-summary changes fixed .Store propagation (but looked ugly), and then it was just a matter of walking through it line by line to see which line broke it. I ended up reverting to `{{- with .Markup "home" -}}{{- with .Render -}}` instead of `{{- .Summary -}}`. The generated HTML is identical, but .Store works now. And I have a headache, after a total of about 5 hours looking into this.

I'm impressed with how far Hugo can push Go's text templates, but... maybe that wasn't the best way to implement something this complicated?

I'm making good progress on my website! I'm using Hugo with Kayal right now. May try to have a crack at making my own Hugo theme in the future.

Now I wanna know, what's the best place to host a static site made with Hugo? I've looked at GitHub Pages, Neocities and Nekoweb. Maybe a DigitalOcean VPS if I ever want to mess with other things beyond static sites but not at the moment.

It needs to at least be accessible via my domain.

I'm looking for a new comment system for my #Hugo blog, and I'm not seeing any clearly great options.

I've been using #Commento for #comments on my blog for a few years now, and it's about time to switch comment systems.

Commento has been effectively unmaintained for 4 years (see gitlab.com/commento/commento). Their (paid) hosted version has been continuing to work, but I've seen increasing numbers of errors lately, so it's time to move.

I'd really *love* something that could integrate semi-natively with #activitypub so new blog posts could show up in Mastodon and Mastodon replies would show up as comments, *but* I don't want to require a fediverse account for commenters; that rules out most (all?) of the embedded-Mastodon comment options.. After looking through Hugo's somewhat-outdated list of commenting options (gohugo.io/content-management/c), it looks like #Discourse is the only option that even *slightly* fits that, and it's a lot heavier-weight than I really want to run today. Hours-of-maintenance-per-comment should be less than 1, thanks.

Basic requirements:

- Either easy to self-host or has a cheap hosted option.
- Allows anonymous comments plus common external auth options.
- Possible to import comments from Commento, possibly requiring code on my part, but it needs to allow arbitrary names, etc.
- Works with static sites.
- Not a privacy disaster
- If self-hosted, ideally written in something sane -- Go, Rust, etc. *Ideally* it's a single binary that listens to HTTP and stores comments in Postgres.
- Supports Markdown.

Does anyone have anything that they're really happy with?

GitLabCommento / Commento · GitLabCommento is a fast, privacy-focused commenting platform

Wanting to get back to #blogging but also wanting to move my blog from wordpress to #hugo web framework seems to be a combo of too many steps that’s been stopping me from doing either.
I should probably start with the first, and move to the second only once I’ve gotten back to the groove of writing and publishing regularly regardless of the quality of the posts.

Hey #FediHelp

I am using quarto in different python projects.

I am using a different python environment for each of my projects.
And per project I am rendering them as HTML files.

How can I make a blog to aggregate my HTML files ?
Like one blog post per project ?

I would like to create a portfolio and I my open to alternatives to quarto

Thanks