diff --git a/.github/workflows/pr-article-details.yml b/.github/workflows/pr-article-details.yml index bc3d9c413..ea4b9057c 100644 --- a/.github/workflows/pr-article-details.yml +++ b/.github/workflows/pr-article-details.yml @@ -43,20 +43,24 @@ jobs: - name: Validate year and month folder run: | - CURRENT_YEAR=$(date +%Y) - CURRENT_MONTH=$(date +%m) - - while IFS= read -r folder; do - if [[ "$folder" =~ ^content/blog/([0-9]{4})/([0-9]{2})/ ]]; then - year="${BASH_REMATCH[1]}" - month="${BASH_REMATCH[2]}" - if [[ "$year" != "$CURRENT_YEAR" || "$month" != "$CURRENT_MONTH" ]]; then - echo "$folder" >> temp/incorrect-yyyy-mm.txt + if [ -f temp/folders.txt ]; then + CURRENT_YEAR=$(date +%Y) + CURRENT_MONTH=$(date +%m) + + while IFS= read -r folder; do + if [[ "$folder" =~ ^content/blog/([0-9]{4})/([0-9]{2})/ ]]; then + year="${BASH_REMATCH[1]}" + month="${BASH_REMATCH[2]}" + if [[ "$year" != "$CURRENT_YEAR" || "$month" != "$CURRENT_MONTH" ]]; then + echo "$folder" >> temp/incorrect-yyyy-mm.txt + fi + else + echo "$folder" >> temp/no-yyyy-mm.txt fi - else - echo "$folder" >> temp/no-yyyy-mm.txt - fi - done < temp/folders.txt + done < temp/folders.txt + else + echo "✅ No blog articles added" + fi - name: Make sure folders are under current YYYY/MM run: | @@ -82,26 +86,30 @@ jobs: - name: Check index.md dates if: always() run: | - error_found=0 - today=$(date +%Y-%m-%d) - - while IFS= read -r mdfile; do - if [[ -f "$mdfile" ]]; then - post_date=$(awk '/^date:/ {gsub(/["'\''"]/,"",$2); print $2}' "$mdfile") - - if [[ ! "$post_date" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then - echo "❌ In '$mdfile': Invalid date format. Use YYYY-MM-DD." - error_found=1 - elif [[ "$post_date" < "$today" ]]; then - echo "❌ In '$mdfile': Date is in the past. Update the publishing date after the article is approved (found: $post_date, today: $today)." - error_found=1 - else - echo "✅ In '$mdfile': Date format is valid and not in the past." + if [ -f temp/index.txt ]; then + error_found=0 + today=$(date +%Y-%m-%d) + + while IFS= read -r mdfile; do + if [[ -f "$mdfile" ]]; then + post_date=$(awk '/^date:/ {gsub(/["'\''"]/,"",$2); print $2}' "$mdfile") + + if [[ ! "$post_date" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then + echo "❌ In '$mdfile': Invalid date format. Use YYYY-MM-DD." + error_found=1 + elif [[ "$post_date" < "$today" ]]; then + echo "❌ In '$mdfile': Date is in the past. Update the publishing date after the article is approved (found: $post_date, today: $today)." + error_found=1 + else + echo "✅ In '$mdfile': Date format is valid and not in the past." + fi fi - fi - done < temp/index.txt + done < temp/index.txt - exit $error_found + exit $error_found + else + echo "✅ No blog articles added" + fi - name: Check summaries in index.md files if: always() diff --git a/archetypes/blog.md b/archetypes/blog.md index 1c47c8391..9a7c31fae 100644 --- a/archetypes/blog.md +++ b/archetypes/blog.md @@ -9,7 +9,7 @@ summary: "Replace it with a brief summary that capture the essence of (1) what t # - Add your personal data at `data/authors/.json` # - Add your author name(s) below authors: - - "author-name" + - "author-name" # same as in the file paths above # Add tags tags: ["Tag1", "Tag2"] --- diff --git a/content/blog/2025/04/esp-fourcc-introduction/index.md b/content/blog/2025/04/esp-fourcc-introduction/index.md index cc21f528f..a52357791 100644 --- a/content/blog/2025/04/esp-fourcc-introduction/index.md +++ b/content/blog/2025/04/esp-fourcc-introduction/index.md @@ -3,7 +3,7 @@ title: "Introduction to ESP FOURCC" date: 2025-04-24 showAuthor: false authors: - - Jason Mao + - jason-mao tags: - Multimedia - ESP-GMF @@ -106,4 +106,4 @@ In the ESP-GMF framework, various modules (such as video decoders, audio process ## Conclusion ESP FOURCC provides a unified and efficient way to identify multimedia data formats across embedded systems, addressing common challenges such as inconsistent identifiers, high conversion overhead, and debugging complexity. By leveraging the compact and expressive FOURCC encoding method, the ESP-GMF framework ensures standardized communication between modules while optimizing for performance and maintainability. -Through clear macro definitions, helper utilities, and an extensible set of format codes, ESP FOURCC enables developers to build scalable and interoperable multimedia applications with ease. Whether working with audio, video, images, or pixel data, ESP FOURCC lays a solid foundation for future-proof, modular embedded multimedia development. \ No newline at end of file +Through clear macro definitions, helper utilities, and an extensible set of format codes, ESP FOURCC enables developers to build scalable and interoperable multimedia applications with ease. Whether working with audio, video, images, or pixel data, ESP FOURCC lays a solid foundation for future-proof, modular embedded multimedia development.