Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 47d0c3518d | |||
| 7a95030086 | |||
| 36d1925580 | |||
| d25a6eabf9 | |||
| 59b5807601 | |||
| 9576701d85 | |||
| 16ac065be5 | |||
| 7f268bb227 |
@@ -9,3 +9,4 @@ tsconfig.tsbuildinfo
|
||||
private/
|
||||
.replit
|
||||
replit.nix
|
||||
public/
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# Define the directory to search in
|
||||
BUILD_DIR="$HOME/quartz/"
|
||||
CONTENT_DIR="$HOME/quartz/content"
|
||||
|
||||
# Find all .md files in the directory and remove all instances of `Blog/` to fix pathing
|
||||
# Needed since all my articles are in the /Blog folder and it's subolfers in Obsidian instread of the base directory
|
||||
find "$CONTENT_DIR" -type f -name "*.md" -print0 | while IFS= read -r -d $'\0' file; do
|
||||
# Replace 'Blog/' with nothing in each file
|
||||
sed -i 's|Blog/||g' "$file"
|
||||
echo "Processed: $file"
|
||||
done
|
||||
|
||||
|
||||
|
||||
# Find all markdown files in the content directory
|
||||
find "$CONTENT_DIR" -name "*.md" -type f | while read -r file; do
|
||||
echo "Processing: $file"
|
||||
|
||||
# Check if the file contains the Private section
|
||||
if grep -q "^# Private$" "$file"; then
|
||||
# Create a temporary file for processing
|
||||
temp_file=$(mktemp)
|
||||
|
||||
# Use sed to remove content between # Private and # /Private inclusive
|
||||
sed '/^# Private$/,/^# \/Private$/d' "$file" > "$temp_file"
|
||||
|
||||
# Replace original file with processed content
|
||||
mv "$temp_file" "$file"
|
||||
|
||||
echo "Removed Private section from: $file"
|
||||
else
|
||||
echo "No Private section found in: $file"
|
||||
fi
|
||||
done
|
||||
|
||||
# echo "Processing complete!"
|
||||
echo "All .md files have been processed."
|
||||
|
||||
cd "${BUILD_DIR}"
|
||||
|
||||
# build the html files
|
||||
npx quartz build
|
||||
|
||||
# copy the files to the apache serve directory using a script
|
||||
sudo /usr/local/bin/sync-quartz-site
|
||||
+5
-5
@@ -8,7 +8,7 @@ import * as Plugin from "./quartz/plugins"
|
||||
*/
|
||||
const config: QuartzConfig = {
|
||||
configuration: {
|
||||
pageTitle: "Quartz 4",
|
||||
pageTitle: "Yuriy's Notes",
|
||||
pageTitleSuffix: "",
|
||||
enableSPA: true,
|
||||
enablePopovers: true,
|
||||
@@ -16,12 +16,12 @@ const config: QuartzConfig = {
|
||||
provider: "plausible",
|
||||
},
|
||||
locale: "en-US",
|
||||
baseUrl: "quartz.jzhao.xyz",
|
||||
baseUrl: "zinchuk.xyz",
|
||||
ignorePatterns: ["private", "templates", ".obsidian"],
|
||||
defaultDateType: "modified",
|
||||
theme: {
|
||||
fontOrigin: "googleFonts",
|
||||
cdnCaching: true,
|
||||
cdnCaching: false,
|
||||
typography: {
|
||||
header: "Schibsted Grotesk",
|
||||
body: "Source Sans Pro",
|
||||
@@ -40,8 +40,8 @@ const config: QuartzConfig = {
|
||||
textHighlight: "#fff23688",
|
||||
},
|
||||
darkMode: {
|
||||
light: "#161618",
|
||||
lightgray: "#393639",
|
||||
light: "#141618",
|
||||
lightgray: "#43515f",
|
||||
gray: "#646464",
|
||||
darkgray: "#d4d4d4",
|
||||
dark: "#ebebec",
|
||||
|
||||
@@ -8,8 +8,6 @@ export const sharedPageComponents: SharedLayout = {
|
||||
afterBody: [],
|
||||
footer: Component.Footer({
|
||||
links: {
|
||||
GitHub: "https://github.com/jackyzha0/quartz",
|
||||
"Discord Community": "https://discord.gg/cRFFHYye7t",
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ export async function handleBuild(argv) {
|
||||
|
||||
const result = await ctx.rebuild().catch((err) => {
|
||||
console.error(`${styleText("red", "Couldn't parse Quartz configuration:")} ${fp}`)
|
||||
console.log(`Reason: ${styleText("grey", err)}`)
|
||||
console.log(`Reason: ${styleText("gray", err)}`)
|
||||
process.exit(1)
|
||||
})
|
||||
release()
|
||||
@@ -395,7 +395,7 @@ export async function handleBuild(argv) {
|
||||
status >= 200 && status < 300
|
||||
? styleText("green", `[${status}]`)
|
||||
: styleText("red", `[${status}]`)
|
||||
console.log(statusString + styleText("grey", ` ${argv.baseDir}${req.url}`))
|
||||
console.log(statusString + styleText("gray", ` ${argv.baseDir}${req.url}`))
|
||||
release()
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ export async function handleBuild(argv) {
|
||||
})
|
||||
console.log(
|
||||
styleText("yellow", "[302]") +
|
||||
styleText("grey", ` ${argv.baseDir}${req.url} -> ${newFp}`),
|
||||
styleText("gray", ` ${argv.baseDir}${req.url} -> ${newFp}`),
|
||||
)
|
||||
res.end()
|
||||
}
|
||||
@@ -482,7 +482,7 @@ export async function handleBuild(argv) {
|
||||
.on("change", () => build(clientRefresh))
|
||||
.on("unlink", () => build(clientRefresh))
|
||||
|
||||
console.log(styleText("grey", "hint: exit with ctrl+c"))
|
||||
console.log(styleText("gray", "hint: exit with ctrl+c"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ async function _navigate(url: URL, isBack: boolean = false) {
|
||||
html.body.appendChild(announcer)
|
||||
|
||||
// morph body
|
||||
micromorph(document.body, html.body)
|
||||
await micromorph(document.body, html.body)
|
||||
|
||||
// scroll into place and add history
|
||||
if (!isBack) {
|
||||
|
||||
@@ -31,7 +31,7 @@ export const Citations: QuartzTransformerPlugin<Partial<Options>> = (userOpts) =
|
||||
// locale available and simply create the lang url-string
|
||||
let lang: string = "en-US"
|
||||
if (ctx.cfg.configuration.locale !== "en-US") {
|
||||
lang = `https://raw.githubusercontent.com/citation-stylelanguage/locales/refs/heads/master/locales-${ctx.cfg.configuration.locale}.xml`
|
||||
lang = `https://raw.githubusercontent.com/citation-style-language/locales/refs/heads/master/locales-${ctx.cfg.configuration.locale}.xml`
|
||||
}
|
||||
// Add rehype-citation to the list of plugins
|
||||
plugins.push([
|
||||
|
||||
Reference in New Issue
Block a user