Skip to content

Commit

Permalink
Refactor holidays pull from TLS1.2 server to use curl
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Dec 4, 2024
1 parent a4c1d72 commit 1cc8c9f
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 3 deletions.
6 changes: 6 additions & 0 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ site.ignore("README.md");
site.ignore("*.DS_Store");
site.ignore("archive");

// Prepare script to get holidays from dbflex
site.script("getholidays", "cd src/_data && curl https://pro.dbflex.net/secure/api/v2/15331/${API_KEY_01}/Work%20Holiday/API%20Holidays%20Today%20or%20Later/select.json -o futureholidays.json");

// Prepare script to copy the generated readme to the repo root
site.script(
"copyreadme",
"cd _site && cp repo-readme.md ../README.md",
);

// Execute scripts before build
site.addEventListener("beforeBuild", "getholidays");
// Execute scripts after build
site.addEventListener("afterBuild", "copyreadme");

Expand Down
Loading

0 comments on commit 1cc8c9f

Please sign in to comment.