Skip to content

Commit 980bb46

Browse files
committed
fix liquid raw
1 parent 2b9bb2d commit 980bb46

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

_posts/2025-03-07-footer-date.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Like most things in CB, you can customize this by digging into the template if i
1717
For example, [Mark McFate](https://github.com/SummittDweller) recently wanted to add a more complete date including the month and day to his project footer.
1818
In the file "_includes/footer.html" he edited the line:
1919

20-
`<p class="text-white">Last updated {{ site.time | date: '%Y' }}</p>`
20+
`{% raw %}<p class="text-white">Last updated {{ site.time | date: '%Y' }}</p>{% endraw %}`
2121

2222
updating the options on the [Liquid date filter](https://shopify.github.io/liquid/filters/date/) to look like:
2323

24-
`<p class="text-white">Last updated {{ site.time | date: '%Y-%b-%d' }}</p>`
24+
`{% raw %}<p class="text-white">Last updated {{ site.time | date: '%Y-%b-%d' }}</p>{% endraw %}`
2525

2626
These options will add a date with year - month abbreviation - day.
2727

@@ -31,10 +31,11 @@ The value `site.time` will be the current time when Jekyll is building the site.
3131
Mark also decided to add logic so that on the About page *only* a more specific date would be displayed.
3232
The line above was edited to look like this:
3333

34-
```
34+
```{% raw %}
3535
{% assign stamp = site.time | date: '%Y-%b-%d' %}
3636
{% if page.url == "/about.html" %}
3737
{% assign stamp = site.time | date: '%B %-d, %Y @ %l:%M%P %Z' %}
3838
{% endif %}
3939
<p class="text-white">Last updated: {{ stamp }}</p>
40+
{% endraw %}
4041
```

0 commit comments

Comments
 (0)