Sort tags alphabetically for consistent ordering
This commit is contained in:
parent
946ce908e9
commit
88e355730b
2 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ class PostDB {
|
||||||
$about-path.unlink if $about-path.l;
|
$about-path.unlink if $about-path.l;
|
||||||
$by-id.add("{$!meta.about-id}.html").symlink: $about-path;
|
$by-id.add("{$!meta.about-id}.html").symlink: $about-path;
|
||||||
# Generate the tags pages
|
# Generate the tags pages
|
||||||
my @tags = %!posts.values.map(*.tags).flat.unique;
|
my @tags = %!posts.values.map(*.tags).flat.unique.sort;
|
||||||
$out-dir.add('tags.html').spurt: $config.generate-tags-page(self, @tags);
|
$out-dir.add('tags.html').spurt: $config.generate-tags-page(self, @tags);
|
||||||
my $tags-dir = $out-dir.add('tags/');
|
my $tags-dir = $out-dir.add('tags/');
|
||||||
mkdir $tags-dir unless $tags-dir.e;
|
mkdir $tags-dir unless $tags-dir.e;
|
||||||
|
|
|
@ -68,7 +68,7 @@ sub post-tag(Str:D $tag) is export {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub post-tags(Post:D $post) is export {
|
sub post-tags(Post:D $post) is export {
|
||||||
my @tags = $post.tags;
|
my @tags = $post.tags.sort;
|
||||||
if @tags {
|
if @tags {
|
||||||
@tags.=map(*.&post-tag);
|
@tags.=map(*.&post-tag);
|
||||||
div :class<post-tags>, [
|
div :class<post-tags>, [
|
||||||
|
|
Loading…
Add table
Reference in a new issue