Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 47d0c3518d | |||
| 7a95030086 | |||
| 36d1925580 | |||
| d25a6eabf9 | |||
| 59b5807601 | |||
| 9576701d85 | |||
| 16ac065be5 | |||
| 7f268bb227 |
@@ -9,3 +9,4 @@ tsconfig.tsbuildinfo
|
|||||||
private/
|
private/
|
||||||
.replit
|
.replit
|
||||||
replit.nix
|
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 = {
|
const config: QuartzConfig = {
|
||||||
configuration: {
|
configuration: {
|
||||||
pageTitle: "Quartz 4",
|
pageTitle: "Yuriy's Notes",
|
||||||
pageTitleSuffix: "",
|
pageTitleSuffix: "",
|
||||||
enableSPA: true,
|
enableSPA: true,
|
||||||
enablePopovers: true,
|
enablePopovers: true,
|
||||||
@@ -16,12 +16,12 @@ const config: QuartzConfig = {
|
|||||||
provider: "plausible",
|
provider: "plausible",
|
||||||
},
|
},
|
||||||
locale: "en-US",
|
locale: "en-US",
|
||||||
baseUrl: "quartz.jzhao.xyz",
|
baseUrl: "zinchuk.xyz",
|
||||||
ignorePatterns: ["private", "templates", ".obsidian"],
|
ignorePatterns: ["private", "templates", ".obsidian"],
|
||||||
defaultDateType: "modified",
|
defaultDateType: "modified",
|
||||||
theme: {
|
theme: {
|
||||||
fontOrigin: "googleFonts",
|
fontOrigin: "googleFonts",
|
||||||
cdnCaching: true,
|
cdnCaching: false,
|
||||||
typography: {
|
typography: {
|
||||||
header: "Schibsted Grotesk",
|
header: "Schibsted Grotesk",
|
||||||
body: "Source Sans Pro",
|
body: "Source Sans Pro",
|
||||||
@@ -40,8 +40,8 @@ const config: QuartzConfig = {
|
|||||||
textHighlight: "#fff23688",
|
textHighlight: "#fff23688",
|
||||||
},
|
},
|
||||||
darkMode: {
|
darkMode: {
|
||||||
light: "#161618",
|
light: "#141618",
|
||||||
lightgray: "#393639",
|
lightgray: "#43515f",
|
||||||
gray: "#646464",
|
gray: "#646464",
|
||||||
darkgray: "#d4d4d4",
|
darkgray: "#d4d4d4",
|
||||||
dark: "#ebebec",
|
dark: "#ebebec",
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ export const sharedPageComponents: SharedLayout = {
|
|||||||
afterBody: [],
|
afterBody: [],
|
||||||
footer: Component.Footer({
|
footer: Component.Footer({
|
||||||
links: {
|
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) => {
|
const result = await ctx.rebuild().catch((err) => {
|
||||||
console.error(`${styleText("red", "Couldn't parse Quartz configuration:")} ${fp}`)
|
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)
|
process.exit(1)
|
||||||
})
|
})
|
||||||
release()
|
release()
|
||||||
@@ -395,7 +395,7 @@ export async function handleBuild(argv) {
|
|||||||
status >= 200 && status < 300
|
status >= 200 && status < 300
|
||||||
? styleText("green", `[${status}]`)
|
? styleText("green", `[${status}]`)
|
||||||
: styleText("red", `[${status}]`)
|
: styleText("red", `[${status}]`)
|
||||||
console.log(statusString + styleText("grey", ` ${argv.baseDir}${req.url}`))
|
console.log(statusString + styleText("gray", ` ${argv.baseDir}${req.url}`))
|
||||||
release()
|
release()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,7 +406,7 @@ export async function handleBuild(argv) {
|
|||||||
})
|
})
|
||||||
console.log(
|
console.log(
|
||||||
styleText("yellow", "[302]") +
|
styleText("yellow", "[302]") +
|
||||||
styleText("grey", ` ${argv.baseDir}${req.url} -> ${newFp}`),
|
styleText("gray", ` ${argv.baseDir}${req.url} -> ${newFp}`),
|
||||||
)
|
)
|
||||||
res.end()
|
res.end()
|
||||||
}
|
}
|
||||||
@@ -482,7 +482,7 @@ export async function handleBuild(argv) {
|
|||||||
.on("change", () => build(clientRefresh))
|
.on("change", () => build(clientRefresh))
|
||||||
.on("unlink", () => 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)
|
html.body.appendChild(announcer)
|
||||||
|
|
||||||
// morph body
|
// morph body
|
||||||
micromorph(document.body, html.body)
|
await micromorph(document.body, html.body)
|
||||||
|
|
||||||
// scroll into place and add history
|
// scroll into place and add history
|
||||||
if (!isBack) {
|
if (!isBack) {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export const Citations: QuartzTransformerPlugin<Partial<Options>> = (userOpts) =
|
|||||||
// locale available and simply create the lang url-string
|
// locale available and simply create the lang url-string
|
||||||
let lang: string = "en-US"
|
let lang: string = "en-US"
|
||||||
if (ctx.cfg.configuration.locale !== "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
|
// Add rehype-citation to the list of plugins
|
||||||
plugins.push([
|
plugins.push([
|
||||||
|
|||||||
Reference in New Issue
Block a user