diff --git a/.gitignore b/.gitignore index 25d07db..602c33c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ tsconfig.tsbuildinfo private/ .replit replit.nix +content/ +public/ diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..b710166 --- /dev/null +++ b/deploy.sh @@ -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 diff --git a/quartz.config.ts b/quartz.config.ts index b3db3d6..4676f4e 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -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", diff --git a/quartz.layout.ts b/quartz.layout.ts index 970a5be..f9b967d 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -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", }, }), }