init
This commit is contained in:
commit
d013ece0f3
363 changed files with 20823 additions and 0 deletions
11
scripts/youtube_rewrite.sh
Executable file
11
scripts/youtube_rewrite.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Set the path to the content folder
|
||||
CONTENT_DIR="../content"
|
||||
|
||||
# Loop through all markdown files in the content folder
|
||||
find "$CONTENT_DIR" -type f -name "*.md" | while read -r file; do
|
||||
# Use sed to replace the old format with the new format while preserving the YouTube ID
|
||||
sed -i '' -E 's|{% include video id="([a-zA-Z0-9_-]+)" provider="youtube" %}|{{ youtube(id="\1") }}|g' "$file"
|
||||
echo "Processed: $file"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue