Skip to content

Commit

Permalink
Updating the Makefile script on the website to work natively with MacOS.
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Ignacio <[email protected]>
  • Loading branch information
pedroignacio13 committed Dec 4, 2024
1 parent 2ea4a9c commit da862fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ deps:

# Update all imported markdown files to work as standalone hugo pages (except READMEs, see below)
# sed command is configured for the Netlify ubuntu env
# If you're NOT running this on a mac, you'll need to remove the empty string after -i (line 25)
find root -type f -name '*.md' | while IFS= read -r file; do \
base_name=$$(basename "$$file" .md); \
if [ "$$file" = "/_index.md" -o "$$base_name" = "README" ]; then \
continue; \
fi; \
title_case=$$(echo "$$base_name" | sed -e 's/-/ /g' -e 's/\b\(.\)/\u\1/g' | sed 's/cncf/CNCF/Ig'); \
text_to_prepend="---\ntitle: \"$$title_case\"\n---\n"; \
sed -i "1s/^/$$text_to_prepend/" "$$file"; \
sed -i "" "1s/^/$$text_to_prepend/" "$$file"; \
done

# Set up Navbar and Sidebar contents
Expand Down

0 comments on commit da862fe

Please sign in to comment.