Add series supports

This commit is contained in:
fundor333
2025-01-27 00:11:12 +01:00
parent c12713570d
commit d1ad350d55
24 changed files with 94 additions and 63 deletions

View File

@@ -11,5 +11,10 @@ categories:
images:
keywords:
series:
- Tech News
- Printing With ReportLab
- Hugo tricks
- Django tricks
- Indiweb, webmentions and friends
---

View File

@@ -39,3 +39,6 @@ outputs:
services:
rss:
limit: 20
taxonomies:
series: series

View File

@@ -10,6 +10,8 @@ title: Microsoft buy Atom, Electron and Open Source
meta:
- github
- microsoft
series:
- Tech News
---
Microsoft now own Github. From this we need to make some talk about the question which all the open source community is doing: "_Whas are going to change into the OpenSource comunity or into the public code?_"

View File

@@ -7,13 +7,15 @@ feature_text: "Photo by David Klein on Unsplash"
tags:
- rant
slug: "good-developer-must-be-blogger"
categories:
categories:
- dev
- rant
description: "For be a good programmer you need to be a blogger and write regulary"
series:
- "A dev need a blog"
---
I find the way to become a good programmer:
I find the way to become a good programmer:
> Write a Blog about what are you doing
@@ -21,7 +23,7 @@ I see more and more good programmers have good blog and good blog about programm
After studing somee good blog and some bad blog I came with this list
> You need to write a blog about what you know.
> You need to write a blog about what you know.
>
> You must keep it updated.
>
@@ -60,9 +62,9 @@ It, also, will be a motivation for research more and more stuff.
More you research more you will want to know. This make a virtuosus circle of curiosity for understanding more and more stuff.
This take you to abuse rss and podcast, because they are the easy way to have new knowledge directly on you phone/tablet/watch/smart mirror/cat.
This take you to abuse rss and podcast, because they are the easy way to have new knowledge directly on you phone/tablet/watch/smart mirror/cat.
In this way you can have ***fingerfoods*** from other source and you can excenge with them.
In this way you can have ***fingerfoods*** from other source and you can excenge with them.
## So?

View File

@@ -8,15 +8,16 @@ tags:
- devops
- hugo
slug: "Hugo-with-lazy-loading-and-webp"
categories:
categories:
- dev
- fingerfood
description: "Adding Lazy load, WebP and AVIF to your Hugo"
meta:
- webp
- avif
- lazy load
series:
- Hugo tricks
---
New work and new knowledge. For having a better site/blog performance you can use _loadding="static"_ in the resources you need last and, if there are img, you can use avif and webp for faster render page time.
@@ -119,7 +120,7 @@ So this is my final _render-image.html_.
{{- end -}}
```
The start if is for manage linked image and work as a base case of this code using the "simple" code for the base.
The start if is for manage linked image and work as a base case of this code using the "simple" code for the base.
For the "this is one of my blog's image" case we use a _picture_ tag. All the _source_ tags after are use only if ugo find the img with the correct img format.
But the real different form the _pawelgrzybek's code_. I get the image config form the image in the content and not from the static's path. With the config of the image we can get the width and the height of the img.

View File

@@ -15,10 +15,11 @@ categories:
- fingerfood
slug: "Letterhead-with-ReportLab"
description: "Sometime you need to have a letterhead document generated by your application and here we explain how to make it with Reportlab"
series:
- Printing With ReportLab
---
Sometime you need to make some pdf looking more professional.
Sometime you need to make some pdf looking more professional.
In python you use the ReportLab[^1] package for make Pdf.
[^1]: [ReportLab](https://www.reportlab.com/opensource/) is an opensource engine for Pdf documents. The python package is [here](https://www.reportlab.com/dev/docs/)
@@ -79,7 +80,7 @@ After you have done you need to make a "_printer_" for your document. In this ca
class PrivacyPaperPrinter(BasicPrinter):
@staticmethod
def _header_footer(canvas, doc):
# Save the state of our canvas so we can draw on it
# Save the state of our canvas so we can draw on it
PrivacyPaperPrinter.header(canvas, doc)
PrivacyPaperPrinter.footer(canvas, doc)

View File

@@ -6,13 +6,15 @@ feature_text: "Photo by Liam Tucker on Unsplash"
tags:
- rant
slug: "Microsoft-and-GitHub-after-some-time"
categories:
categories:
- rant
description: "Three years later I talk about Microsoft buying Github"
meta:
- github
- microsoft
series:
- Tech News
---
This post is a follow up to one of my old post: [Microsoft buy Atom, Electron and Open Source](/post/2018/microsoft-buy-atom-electron-and-open-source).
@@ -26,9 +28,9 @@ So I search more and find the [official blog's post](https://blogs.microsoft.com
After reading it and some more research I write a [post](/post/2018/microsoft-buy-atom-electron-and-open-source).
## The big questions
## The big questions
Now is three years after the original post and I have an answer for some of the questions i ask in my post.
Now is three years after the original post and I have an answer for some of the questions i ask in my post.
### Github has problems. Microsoft buying it will solve the problems or kill GitHub?
@@ -83,9 +85,9 @@ Now you have multiple integration from Azure to GitHub and from GitHub to Azure.
## Conclusion
In my opinion is this[^1] bad for the Open Source community?
In my opinion is this[^1] bad for the Open Source community?
[^1]: Microsoft owning GitHub
**_Yes_**. No one must controll the biggest hosting for code.
**_Yes_**. No one must controll the biggest hosting for code.
_But how we can change the situation?_

View File

@@ -11,12 +11,13 @@ categories:
- fingerfood
- dev
description: "Generate WebP and AVIF with Hugo"
meta:
- webp
- avif
- lazy load
- microformat
series:
- Hugo tricks
---
## In the last episode

View File

@@ -13,8 +13,9 @@ categories:
- dev
- fingerfood
description: "How to have infinite scrolling in Django FilterView"
meta:
series:
- Django tricks
---
Sometime you want to have infinite scrolling in a Django ListView.

View File

@@ -17,6 +17,10 @@ meta:
- pdf
- python
Focus_Keyword: "django pdf reportlab"
series:
- Django tricks
- Printing With ReportLab
---
Sometime you need to print a pdf from your site or your web app with some custom data.

View File

@@ -14,8 +14,8 @@ categories:
- post
- fingerfood
description: "How to make a django form for reading BarCode and QRCode"
meta:
series:
- Django tricks
---
For work I need to implement a strange usercase: I need to have a form with QRCode and BarCode input.

View File

@@ -14,6 +14,8 @@ categories:
- dev
- coding
description: "Adding Indieweb and Webmention in my blog"
series:
- Indiweb, webmentions and friends
---

View File

@@ -16,6 +16,9 @@ description: "How to use Django messages with Boostrap5"
meta:
- message
- allert
series:
- Django tricks
---
Sometime you need to send an allert/message from your Django project to the user, like a popup or a gui message for an user interaction ("Sent the mail", "Done the task", ...) and you want to make it with style (Boostrap in this case).

View File

@@ -18,6 +18,9 @@ mp-syndicate-to:
- https://brid.gy/publish/mastodon
aliases:
- /post/2023/02/more-stuff-i-do-with-webmention-micropub-and-bridgy/
series:
- Hugo tricks
- Indiweb, webmentions and friends
---
After my first work on Micropub, Microformat and WebMention (you can find more [here]({{< ref "/post/2022/indieweb-webmention-and-h-entry-in-my-blog" >}} "How I implement Indieweb, Webmention and H Entry in My Blog")) I change some things here and there.

View File

@@ -22,8 +22,7 @@ keywords:
aliases:
- "/post/2024/new-render-image-fot-hugo/"
series:
- https://fundor333.com/post/2021/hugo-with-lazy-loading-and-webp/
- https://fundor333.com/post/2021/webp-and-avif-with-hugo-generator/
- Hugo tricks
---
## The story so far
@@ -130,7 +129,7 @@ So this is my code form the path _**layouts/_default/_markup/render-image.html**
{{ end }}
```
```
In this code I set some values from the configs of the site so you can customize it in your theme and import it when ever you need it.

View File

@@ -19,6 +19,8 @@ keywords:
- blog
- site
- social media
series:
- "A dev need a blog"
---
I am a HUGE RSS reader so sometime I find something interesting and I want to read the full post.
@@ -36,7 +38,7 @@ So this is my point of view.
## The problem with the Social Media
This is the era of Fast Social Media, your social media experience change every year. TikTok, YouTube Short and Instagram Reals are now the new standard, a short type of format which is eating away the other type of post (text, photo, long video) and for now they are the standard.
This is the era of Fast Social Media, your social media experience change every year. TikTok, YouTube Short and Instagram Reals are now the new standard, a short type of format which is eating away the other type of post (text, photo, long video) and for now they are the standard.
But now with the AI generating content there will be a change of the type of the post you need to make for the _algorithm god_.

View File

@@ -11,22 +11,23 @@ categories:
- dev
images:
keywords:
series:
feature_link: "https://www.midjourney.com/home/"
feature_text: "by IA Midjourney"
series:
- Hugo tricks
---
A lot of time ago I was an active user of DevianArt[^1] where I share my photos.
[^1]: A social media site for artists. [Here](https://fundor333.deviantart.com) is my old profile
One of the things I loved of the site are the meta-data under the photo.
One of the things I loved of the site are the meta-data under the photo.
If you share any digital media with metadata, the site show them ([example](https://www.deviantart.com/fundor333/art/Venice-light-1071838909)) and because of them I learn something of photography.
But now [DeviantArt is a zombie](https://micro.fundor333.com/2025/01/15/do-we-need-all-this/) and Instagram is not in a good place so I want to build my own photo space.
## Searching for Theme
So I search something like a GoHugo Theme with photo gallery and single page info.
So I search something like a GoHugo Theme with photo gallery and single page info.
Every theme I found with this support I didn't like it.
One has the gallery but not the single page, one was only gallery no posts, one was single photo or video... So I change my mind and start reading the doc for Gohugo and some article find on google about GoHugo and photos...
@@ -192,7 +193,7 @@ In the header of the markdown you need to have all the image you want to render
</div>
</div>
```
In this template the first thing we do is find all resources which are image and render with a loop.
In this template the first thing we do is find all resources which are image and render with a loop.
After render the image in a _figure_ tag we search the file for metadata EXIF.
All the value EXIF we find we show them. Some are inside a "switch case" because we need something more human readible for some of them.

View File

@@ -15,6 +15,8 @@ keywords:
- blogging
- hacking
series:
- Hugo tricks
- Indiweb, webmentions and friends
---
A lot of time ago I implement the Webmention in my site following a lot of blogpost.

View File

@@ -13,7 +13,6 @@ keywords:
- bash
- terminal
- zsh
series:
feature_link: "https://www.midjourney.com/home/"
feature_text: "by IA Midjourney"
---

View File

@@ -13,9 +13,10 @@ keywords:
- meta
- photo
- social network
series:
feature_link: "https://www.midjourney.com/home/"
feature_text: "by IA Midjourney"
series:
- Tech News
---
Instagram is a social network based on images and more recently on short format video (TikTok style) called stories.
@@ -42,7 +43,7 @@ All of this because:
## Second problem
Meta now has community note not fact checking[^communitynote].
So if i post a photo of my cat flying and I have a big community, I can say in the community note
So if i post a photo of my cat flying and I have a big community, I can say in the community note
> Cat can fly on Friday Afternoon but only when Mars is in the Fishes
>

View File

@@ -17,6 +17,12 @@ You mentioned this post on your site? Send a <a href="https://indieweb.org/Webme
<br>
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{- if .Params.series -}}
<div class="post-series-bottom">
{{ partial "series.html" . }}
</div>
{{- end -}}
{{ with $related }}
<h3>See Also</h3>

View File

@@ -0,0 +1,23 @@
{{- with (.GetTerms "series") -}}
{{- range . -}}
{{- $series := .Pages.ByDate -}}
<details class="entry-toc">
<summary>
<span class="entry-toc-header">
This post is part of the <strong>{{ .Title }}</strong> series
</span>
</summary>
<ol>
{{- range $series -}}
<li>
{{- if eq .File.UniqueID $.File.UniqueID -}}
<b>{{ .Title }}</b>
{{- else -}}
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{- end -}}
</li>
{{- end -}}
</ol>
</details>
{{- end -}}
{{- end -}}

View File

@@ -21,4 +21,3 @@
{{ end }}

View File

@@ -1,31 +0,0 @@
<h1> ----- </h1>
{{ $urlized := (replace (absURL .RelPermalink) "http://localhost:1313" "https://fundor333.com") | md5 }}
{{index .Site.Data.webmentions $urlized }}
{{ if index .Site.Data.webmentions $urlized }}
{{ $data:= index (index .Site.Data.webmentions $urlized ) "stats" }}
<h1>---</h1>
{{ $likes := index (index .Site.Data $urlized) "like-of" }}
{{ $replys := index (index .Site.Data $urlized) "in-reply-to" }}
{{ $reposts := index (index .Site.Data $urlized) "repost-of"}}
<h4>Likes</h4>
{{ range $i, $like := $likes }}
<a href="{{$like.url}}"><img src="{{ $like.author.photo}}" alt="{{ $like.author.name }}" class="profile photo"></a>
{{end}}
<h4>Reposts</h4>
{{ range $i, $repost := $reposts }}
<a href="{{$repost.url}}"><img src="{{ $repost.author.photo}}" alt="{{ $repost.author.name }}" class="profile photo"></a>
{{end}}
<h4>Comments and Replies</h4>
{{ range $i, $reply := $replys }}
<a href="{{$reply.url}}"><img src="{{ $reply.author.photo}}" alt="{{ $reply.author.name }}" class="profile photo"></a>
{{end}}
{{end}}