Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit cb8fda2

Browse files
committed
docs: update CHANGELOG.md
1 parent 2ab52a1 commit cb8fda2

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
### Added
66

7+
- You can now access the full Serum project settings in your templates using
8+
`@project`. This will eventually replace the existing `@site`, which has been
9+
exposing a very small subset of your project settings.
10+
711
- Introduces `:pretty_urls` project option, which takes one of these three value:
812

913
- `false` disables pretty URLs.
@@ -18,6 +22,29 @@
1822
is equivalent to `:posts`, but this behavior will change as more page
1923
types are supported in the future.
2024

25+
- You can now specify "canonical URL" for your blog posts.
26+
27+
```
28+
---
29+
title: Reposted Article
30+
date: 2022-09-04
31+
tags: sample
32+
canonical_url: https://example.com/original-article
33+
---
34+
```
35+
36+
Then you can access the canonical URL in your templates using
37+
`@page.canonical_url`.
38+
39+
```html
40+
<%= if @page.type === :post do %>
41+
<%
42+
canonical_url = @page.canonical_url || URI.merge(@project.server_root, @page.url)
43+
%>
44+
<link rel="canonical" href="<%= canonical_url %>">
45+
<% end %>
46+
```
47+
2148
## v1.5.1 &mdash; 2021-05-22
2249
2350
### Fixed

0 commit comments

Comments
 (0)