Skip to content

Commit

Permalink
add really basic series support
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko Matsakis committed Sep 27, 2024
1 parent 4c0a699 commit 598e4b0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
9 changes: 9 additions & 0 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,13 @@ blockquote {

blockquote p {
display: inline;
}


.series {
background: #f9f9f9;
border-left: 10px solid #ccc;
margin: 1.5em 10px;
padding: 0.5em 10px;
// quotes: "\201C" "\201D" "\2018" "\2019";
}
7 changes: 6 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ noClasses = false

[module]
[[module.imports]]
path = "github.com/kaushalmodi/hugo-atom-feed"
path = "github.com/kaushalmodi/hugo-atom-feed"

[taxonomies]
category = 'categories'
series = 'series'
tag = 'tags'
2 changes: 2 additions & 0 deletions content/blog/2024-09-26-overwrite-trait.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "Making overwrite opt-in #crazyideas"
date: 2024-09-26T21:51:55Z
series:
- "Overwrite trait"
---

What would you say if I told you that it was possible to (a) eliminate a lot of “inter-method borrow conflicts” *without* introducing something like [view types][] and (b) make pinning easier even than boats’s [pinned places][] proposal, all without needing pinned fields or even a pinned keyword? You’d probably say “Sounds great… what’s the catch?” The catch it requires us to change Rust’s fundamental assumption that, given `x: &mut T`, you can always overwrite `*x` by doing `*x = /* new value */`, for any type `T: Sized`. This kind of change is tricky, but not impossible, to do over an edition.
Expand Down
27 changes: 19 additions & 8 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
{{ define "body" }}
<header>
<h1>{{ .Title }}</h1>
<p class="date">{{ .Date.Format "2 January 2006" }}</p>
</header>

<div class="markdown">
{{ .Page.Content }}
</div>
<header>
<h1>{{ .Title }}</h1>
<p class="date">{{ .Date.Format "2 January 2006" }}</p>
</header>

{{ with .GetTerms "series" }}

{{ range . }}
<div class="series">
NB. This page is part of the <a href="{{ .RelPermalink }}">series "{{ .LinkTitle }}"</a>.
<br><a href="{{ .RelPermalink }}">Click here to see all posts</a>.
</div>
{{ end}}

{{ end }}

<div class="markdown">
{{ .Page.Content }}
</div>
{{ end }}

0 comments on commit 598e4b0

Please sign in to comment.