WIP pagination
This commit is contained in:
parent
7613559c1f
commit
61559ed524
2 changed files with 17 additions and 5 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
---js
|
||||||
|
{
|
||||||
|
pagination: {
|
||||||
|
data: "collections.all",
|
||||||
|
size: 5,
|
||||||
|
alias: "posts",
|
||||||
|
before: function(posts) {
|
||||||
|
return posts.sort((postA, postB) => new Date(postB.date) - new Date(postA.date));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
---
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -8,7 +20,7 @@
|
||||||
<body>
|
<body>
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
|
|
||||||
{%- for post in collections.all -%}
|
{%- for post in posts -%}
|
||||||
<a href="{{ post.url }}">
|
<a href="{{ post.url }}">
|
||||||
{{ post.data.title }}
|
{{ post.data.title }}
|
||||||
</a>
|
</a>
|
||||||
|
|
8
content/.obsidian/workspace
vendored
8
content/.obsidian/workspace
vendored
|
@ -9,7 +9,7 @@
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "index.md",
|
"file": "posts/a_modern_terminal_workflow_3.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "index.md",
|
"file": "posts/a_modern_terminal_workflow_3.md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
|
@ -89,6 +89,7 @@
|
||||||
},
|
},
|
||||||
"active": "a8e90712c1fef449",
|
"active": "a8e90712c1fef449",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"posts/a_modern_terminal_workflow_3.md",
|
||||||
"index.md",
|
"index.md",
|
||||||
"posts/deving_on_linux_is_fun.md",
|
"posts/deving_on_linux_is_fun.md",
|
||||||
"posts/coming-out-again-nb.md",
|
"posts/coming-out-again-nb.md",
|
||||||
|
@ -97,7 +98,6 @@
|
||||||
"posts/blm.md",
|
"posts/blm.md",
|
||||||
"posts/best-improv-performance-yet.md",
|
"posts/best-improv-performance-yet.md",
|
||||||
"posts/a_modern_terminal_workflow_2.md",
|
"posts/a_modern_terminal_workflow_2.md",
|
||||||
"posts/ember-modifiers.md",
|
"posts/ember-modifiers.md"
|
||||||
"posts/code2college-volunteering-resume-prep.md"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue