the following is a draft for the release page that should explain most of it:
* Index page: the way main sections were evaluated was unclear and probably changed much from the original design in GoHugo. This has been fixed and the main sections are now evaluated in a more consistent way. This might affect what is shown on your website, so open a discussion if you see something wrong and try to explain exactly what you expected to see in sense of included posts and order of those posts.
The old way did this: check all configured main sections (or post, if nothing is set) > range through the section and display the first n+m posts (n = number of full previews, m = number of title previews only).
The new way does this: load all posts in the main sections > range through the collection and display the first n+m posts (n = number of full previews, m = number of title previews only).
Basically, the old way took every single section you configured and displayed them separate, the new way takes all posts from all sections and displays them in one list. This is more consistent and should be more predictable for you as a user. It's also the way it was intended to work from the beginning according to the documentation.
closes#686
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
A recent commit changed the config for social to use a map instead of a
list, this broke the social share/follow, though a quick fix seems to
restore it and removes the need for sorting.
Closes#808
I checked the wikipedia example from the original issue and it seems
like this will also fix that. I'm not sure if you had anything else to
fix, feel free to push to my branch.
<!---
Add the issue number that is discussed and fixed by this PR (In the form
`Closes #123`). If this PR doesn't fix an issue, remove the line below.
This will
also lead to us not treating this PR as an important one. It might be
closed
without a review.
If there is no issue associated with this PR and you are not a
maintainer of
this repository, your PR might be closed without a review.
-->
Closes#794
You can no longer set `recent_posts_number = 0` because in current hugo
versions `{{ $n_posts := $.Param "recent_posts_number" | default 3 }}`
will default to three if recent_posts_number is 0. This used to work a
couple of versions back, I am assuming this is not a regression but
rather wanted behavior in hugo -- so I introduce a new parameter
(boolean) `show_recent_posts` to enable(default) or disable recent posts
on index.
<!---
Explain what this PR does and what existing problem it solves. If this
PR is a
work in progress, please prefix the title with [WIP].
-->
<!--
Make sure that the code is readable and well-documented. If you have
added new
functionality, please add the necessary documentation.
If testing of the new functionality is possible, please add tests.
-->
In these cases the site permalink is used instead of the social network
URL for sharing as defined in the `link` value
(https://www.linkedin.com/shareArticle in the below example)
Most visible case is LinkedIn but all social networks that have
```toml
[ananke.social.networks.particles]
...
params = "..."
```
in `config/_default/params.toml` are affected by this bug.
Closes#768.
You can't just cache the share links, that will result into every blog
post having the same URL.
Just use `partial` on the getShareLink.html. So now each post will show
the correct URL to share the post via social media or alike.
---------
Signed-off-by: Melroy van den Berg <melroy@melroy.org>
Signed-off-by: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
Co-authored-by: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
You definitely want to **add Plainify transformer first**, because the
body content will become a HTML encoding mess. I left `HTMLEscape` there
as well, just be sure for security reasons. But if you want, I can
remove the second transformer.
Like a tweet on X will look like this:

After implementing `transform.Plainify`, it will look much better:

(ignore the red, I don't have X premium pro blabla, it's red because I
hit the max limit of chars)
Signed-off-by: Melroy van den Berg <melroy@melroy.org>
Do NOT use the same cache name for social _share_ and social _follow_..
This will never work of course.
Signed-off-by: Melroy van den Berg <melroy@melroy.org>
A bare bones setup of two pages and two posts gets broken because of a
template change missed in #665
Fatal error message in readable form:
```
ERROR render:
failed to render pages:
render of "home" failed: "/themes/ananke/layouts/index.html:48:23":
execute of template failed:
template:
index.html:48:23:
executing "main" at <.Site.GetPage>: can't evaluate field Site in type string
```
Steps to reproduce:
```shell
hugo new site quickstart
cd quickstart
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo "theme = 'ananke'" >> hugo.toml
echo -e "+++\ntitle='Home'\n+++\n\nMain page" > content/_index.md
echo Foo. > content/page1.md
echo Bar > content/page2.md
mkdir -p content/post
echo "First post." > content/post/post1.md
echo "Second post." > content/post/post2.md
hugo server
Watching for changes in .../quickstart/{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in .../quickstart/hugo.toml, ...quickstart/themes/ananke/config.yaml
Start building sites …
hugo v0.125.3-474c4c02212cf97712c6fbf4159c68822ea6e078+extended darwin/amd64 BuildDate=2024-04-22T17:18:35Z VendorInfo=brew
Built in 67 ms
Error: error building site: render: failed to render pages: render of "home" failed: ".../quickstart/themes/ananke/layouts/index.html:48:23": execute of template failed: template: index.html:48:23: executing "main" at <.Site.GetPage>: can't evaluate field Site in type string
```
When you want to publish content that is already published on a different site. You need to reference a canonical url of the original content.
By defining the `canonicalUrl` in the front matter definition the canonical url is set in the headers.
* assets: replace Mastodon logo
The new version is based on the logo-black.svg file distributed from
https://joinmastodon.org/branding, adjusted to match the metrics of the
other social logos.
* layouts: change the color for the mastodon social link
I've picked a purple from https://joinmastodon.org/branding.