Skip to content

Instantly share code, notes, and snippets.

@bzg
Last active March 14, 2025 07:19
Show Gist options
  • Save bzg/9d38062f4cf17569884f7f825bb151d2 to your computer and use it in GitHub Desktop.
Save bzg/9d38062f4cf17569884f7f825bb151d2 to your computer and use it in GitHub Desktop.
# Install Clojure, Babashka and bbin installed:
brew install babashka/brew/bbin
# For other installation methods, see these links:
# https://clojure.org/guides/install_clojure
# https://github.com/babashka/babashka#installation
# https://github.com/babashka/bbin#installation
# Install scripts:
bbin install https://raw.githubusercontent.com/codegouvfr/codegouvfr-cli/refs/heads/main/src/faq-dsfr.clj
bbin install https://raw.githubusercontent.com/bzg/org-utils/refs/heads/main/src/org-unwrap.clj
bbin install https://raw.githubusercontent.com/bzg/org-utils/refs/heads/main/src/org-parse.clj
# Download index.org, unwrap it, parse it into a json file and run the faq app:
wget https://raw.githubusercontent.com/codegouvfr/documentation/refs/heads/main/index.org
org-unwrap -i index.org -o index-unwrapped.org
org-parse -H -m 3 -n 3 -t "^Foire" index-unwrapped.org
# Serve the web application:
faq-dsfr -f index-unwrapped.json
# Browse the FAQ 🧢
xdg-open http://localhost:8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment