Skip to content

Commit 920935e

Browse files
committed
feat: add archive frontmatter option
1 parent 11c76b2 commit 920935e

18 files changed

Lines changed: 11 additions & 2 deletions

archive/template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ related:
2626
auto: true # Use an auto algorithm to determine whether a post is related.
2727
# See more params in related.js.
2828
draft: true # Set true to not publish.
29+
archived: true # Set true to archive. Link still exists, but won't be shown in any collection.
2930
feed: false # Don't show in feed.
3031
noindex: true # Set true to add a noindex metadata, to indicate SE robots to not index this page.
3132
permalink: /posts/permalink/to/post/

content/content.11tydata.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
showToc: false,
99

1010
eleventyComputed: {
11-
eleventyExcludeFromCollections: data => (data.draft && !process.env.BUILD_DRAFTS),
11+
eleventyExcludeFromCollections: data => data.archived || (data.draft && !process.env.BUILD_DRAFTS),
1212
permalink: data => (data.draft && !process.env.BUILD_DRAFTS ? false : data.permalink),
1313
hasPostedDate: data => {
1414
// Check if the file contains a date.

archive/posts/tamuctf22/2022-04-23-tamuctf-2022-quick-mafs.md renamed to content/posts/ctf/tamuctf22/2022-04-23-tamuctf-2022-quick-mafs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ tags:
88
- programming
99
thumbnail_src: assets/inspector-gadget.png
1010
use_math: true
11+
archived: true
1112
---
1213

1314
### Challenge Description
File renamed without changes.
File renamed without changes.

archive/posts/01-morning-ecstasy/2020-05-01-morning-ecstasy.md renamed to content/posts/music/01-morning-ecstasy/2020-05-01-morning-ecstasy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ track_id: 1329504610
1010
score_id: 8527178
1111
related:
1212
posts: [buoyant-ecstasy, morning-rush]
13+
archived: true
1314
---
1415

1516
Composed in the student dorms during the Covid 2020 Spring.

archive/posts/01-morning-ecstasy/assets/candy-swirls.jpg renamed to content/posts/music/01-morning-ecstasy/assets/candy-swirls.jpg

File renamed without changes.

archive/posts/02-buoyant-ecstasy/2020-06-01-buoyant-ecstasy.md renamed to content/posts/music/02-buoyant-ecstasy/2020-06-01-buoyant-ecstasy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ track_id: 1329509965
1111
score_id: 8527388
1212
related:
1313
posts: [morning-ecstasy]
14+
archived: true
1415
---
1516

1617
Alike [Morning Ecstasy](/posts/morning-ecstasy), this piece was also composed in 2020 Spring, during the first several months of the Covid-19 pandemic. In addition, this was composed as a project for an (introductory) course on music theory.

archive/posts/02-buoyant-ecstasy/assets/swirling-wisps-2.jpg renamed to content/posts/music/02-buoyant-ecstasy/assets/swirling-wisps-2.jpg

File renamed without changes.

archive/posts/03-feeling-boisterous/2021-08-20-feeling-boisterous-on-a-chilly-night-while-walking-home-after-a-long-day-at-school.md renamed to content/posts/music/03-feeling-boisterous/2021-08-20-feeling-boisterous-on-a-chilly-night-while-walking-home-after-a-long-day-at-school.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ thumbnail_src: assets/winter-road.jpg
1212
track_id: 1146309223
1313
related:
1414
tags: [electronic]
15+
archived: true
1516
---
1617

1718
That feeling when you boisterously walk (or bike, drive, swim, fly) home on a chilly night after a long day at school.

0 commit comments

Comments
 (0)