Quartz sync: Jun 25, 2024, 5:36 AM

This commit is contained in:
Justin 2024-06-25 05:36:53 -04:00
parent 17f9bf0d25
commit d3bb86a2d4
8 changed files with 167 additions and 9 deletions

View File

@ -0,0 +1,69 @@
---
title: 2024-06-25
author: ["Justin"]
lastmod: 2024-06-25T05:33:14-04:00
draft: false
---
## Agenda {#agenda}
### Tasks {#tasks}
- [ ] Anki Review - Chinese
- [ ] Exercise
- [ ] Watch a new movie
- [ ] Write a new note
- [ ] Read
## Notes {#notes}
### Reading {#reading}
- [I Will Fucking Piledrive You If You Mention AI Again — Ludicity](https://ludic.mataroa.blog/blog/i-will-fucking-piledrive-you-if-you-mention-ai-again/)
- I think this is directionally correct. I love LLMs and use them quite a bit
(my god, it's so cheap, It cost me ~3 dollars to do something
that'd take hours before) but for the forseeable future I don't think I'd
trust most corporate initiatives to pull it off under budget or in a way
that doesn't give bad optics.
- A (personal) example is I used an LLM to generate mnemonics for my Chinese decks
(I'd say about 5% of them had to be redone, but I'm low agency enough to
admit if I didn't use a script to create them I wouldn't have ~1000+ hanzi
memorized by now)
- I've seen enough corporate initiatives go insane that should've
been simple (example in the article, a simple CRUD app,
etc. etc.) that I wouldn't trust 90% of the Fortune 500 to rollout
something without SERIOUS cost overruns.
## Journal {#journal}
### Morning {#morning}
- Trying this out, I ended up making a new capture template for my org-roam
dailies, as you can see here. The differences between capture-today and the
template is a bit finnicky.
<!--listend-->
```elisp
(setq org-roam-dailies-capture-templates
'(("d" "daily" plain
"* Agenda\n** Tasks\n- [ ] %?\n\n* Notes\n** Ideas\n- \n\n* Journal\n** Morning\n- \n\n** Evening\n- \n"
:target (file+head "%<%Y/%m/%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n#+hugo_tags: noexport\n\n")
:unnarrowed t
:empty-lines 1
)))
```
- I have some lunch meetings so I'm not sure how much I'll get done today. I'd
like to work on this site some more.
### Evening {#evening}
-

View File

@ -0,0 +1,3 @@
---
title: "2024"
---

0
content/daily/index.md Normal file
View File

View File

@ -1,6 +1,14 @@
---
title: Welcome to Quartz
title: Welcome
---
This is a blank Quartz installation.
See the [documentation](https://quartz.jzhao.xyz) for how to get started.
I haven't prettied it up yet, but plan on using this as a dumping ground for notes and media and such.
The ideal would be then to utilize those for bigger articles on the [main site(?)](https://justin.vc) - we'll see how it goes.
Before this I was planning on doing some mass exports with a doomscript but I found quartz to be a easier solution, with a bonus that it kind of looks like (which I'm sure it was originally meant for) a host-yourself variant of obsidian publish.
My workflow idea is: org-roam-daily note -> daily -> notes
Most of these will be just random things I'm reading, I think. I still need to figure out a good way to do a slip-box. I have a org server extension I can send links to but I forget to do it. Same with pocket (non-open source reasons aside, it has a really nice package for emacs)
- [Daily Notes](/daily/)

View File

@ -0,0 +1,20 @@
---
title: "Testing Again"
author: ["Justin"]
date: 2024-06-23T23:57:00-04:00
lastmod: 2024-06-25T05:35:20-04:00
tags: ["stub"]
draft: false
---
Beep.
I don't know how I want to handle links under the notes section.
Categories, maybe?
<https://www.google.com>
```python
def add(x,y):
return x + y
```

View File

@ -59,14 +59,18 @@ const config: QuartzConfig = {
Plugin.SyntaxHighlighting({
theme: {
light: "github-light",
dark: "github-dark",
dark: "dracula",
},
keepBackground: false,
}),
Plugin.ObsidianFlavoredMarkdown({ enableInHtmlEmbed: false }),
Plugin.OxHugoFlavouredMarkdown(),
Plugin.GitHubFlavoredMarkdown(),
Plugin.TableOfContents(),
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
Plugin.TableOfContents({ showByDefault: true, collapseByDefault: false, maxDepth: 5 }),
Plugin.CrawlLinks({
markdownLinkResolution: "absolute",
openLinksInNewTab: true,
lazyLoad: true,
}),
Plugin.Description(),
Plugin.Latex({ renderEngine: "katex" }),
],

View File

@ -26,7 +26,61 @@ export const defaultContentPageLayout: PageLayout = {
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()),
Component.DesktopOnly(
Component.Explorer({
mapFn: (node) => {
// Don't change name of root node
node.displayName = node.displayName.toLowerCase()
if (node.depth > 0) {
// Set emoji for file/folder
if (node.file) {
node.displayName = "📄 " + node.displayName
} else {
node.displayName = "📁 " + node.displayName
}
}
},
sortFn: (a, b) => {
// Function to check if a file name is in date format (YYYY-MM-DD)
const isDateFormatted = (name: string): boolean => /^\d{4}-\d{2}-\d{2}/.test(name)
// Extract date from filename if it's date-formatted
const getDate = (name: string): Date | null => {
const match = name.match(/^(\d{4})-(\d{2})-(\d{2})/)
return match
? new Date(parseInt(match[1]), parseInt(match[2]) - 1, parseInt(match[3]))
: null
}
// If both items are date-formatted, sort by date in descending order
if (isDateFormatted(a.name) && isDateFormatted(b.name)) {
const dateA = getDate(a.name)
const dateB = getDate(b.name)
if (dateA && dateB) {
return dateB.getTime() - dateA.getTime()
}
}
// For folders, sort by name in ascending order
if (!a.file && !b.file) {
return a.name.localeCompare(b.name, undefined, {
numeric: true,
sensitivity: "base",
})
}
// Files come after folders
if (a.file && !b.file) return 1
if (!a.file && b.file) return -1
// For non-date files, sort by name in ascending order
return a.name.localeCompare(b.name, undefined, {
numeric: true,
sensitivity: "base",
})
},
}),
),
],
right: [
Component.Graph(),

View File

@ -31,7 +31,7 @@ export default ((opts?: Partial<FolderContentOptions>) => {
const folderParts = folderSlug.split(path.posix.sep)
const fileParts = fileSlug.split(path.posix.sep)
const isDirectChild = fileParts.length === folderParts.length + 1
return prefixed && isDirectChild
return prefixed
})
const cssClasses: string[] = fileData.frontmatter?.cssclasses ?? []
const classes = ["popover-hint", ...cssClasses].join(" ")