Changed alpha ordering and updated Readme

This commit is contained in:
Leon Mika 2025-06-28 11:09:06 +10:00
parent 3958da9c2e
commit f1f0d2ae7a
3 changed files with 16 additions and 4 deletions

View file

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2025 lmika Copyright (c) 2025 Leon Mika
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View file

@ -1,3 +1,15 @@
# postlist-for-micro.blog # Postlist for Micro.blog
A shortcode for post-list A Micro.blog plugin for adding a shortcode for displaying a dynamic list of posts, similar to [Bear Blog's post macro](https://docs.bearblog.dev/embedding-blog-post-lists/).
## Installing
To install on your Micro.blog site, go to the plugin directory and search for "postlist".
Once installed, you can add a post list to your site by using the `postlist` short-code:
```
{{< postlist >}}
```
See [the usage guide](https://postlist.micro.blog/) for how you can customise this post list, including filtering to posts matching a given category, or changing the sort order.

View file

@ -5,7 +5,7 @@
{{- $pgr = (where $pgr "Params.categories" "intersect" (slice .)) -}} {{- $pgr = (where $pgr "Params.categories" "intersect" (slice .)) -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- if (eq (.Get "order") "link-title" ) -}} {{- if (eq (.Get "order") "alpha" ) -}}
{{- $pgr = $pgr.ByLinkTitle -}} {{- $pgr = $pgr.ByLinkTitle -}}
{{- end -}} {{- end -}}
<ul class="postlist"> <ul class="postlist">