Skip to content

Commit

Permalink
docs: update CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Dalgona committed Sep 4, 2022
1 parent 2ab52a1 commit cb8fda2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

### Added

- You can now access the full Serum project settings in your templates using
`@project`. This will eventually replace the existing `@site`, which has been
exposing a very small subset of your project settings.

- Introduces `:pretty_urls` project option, which takes one of these three value:

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

- You can now specify "canonical URL" for your blog posts.

```
---
title: Reposted Article
date: 2022-09-04
tags: sample
canonical_url: https://example.com/original-article
---
```

Then you can access the canonical URL in your templates using
`@page.canonical_url`.

```html
<%= if @page.type === :post do %>
<%
canonical_url = @page.canonical_url || URI.merge(@project.server_root, @page.url)
%>
<link rel="canonical" href="<%= canonical_url %>">
<% end %>
```

## v1.5.1 &mdash; 2021-05-22

### Fixed
Expand Down

0 comments on commit cb8fda2

Please sign in to comment.