initial
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
Some checks failed
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,3 +9,5 @@ tsconfig.tsbuildinfo
|
||||
private/
|
||||
.replit
|
||||
replit.nix
|
||||
content/
|
||||
public/
|
||||
|
||||
46
deploy.sh
Executable file
46
deploy.sh
Executable file
@@ -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
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user