From b056ad8e42ea4e24b1700bbd4c321e0438f0d126 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 16 Jan 2025 15:33:00 +0100 Subject: [PATCH] Link to website commit in footer --- Makefile | 9 ++++++++- .../components/footer.eml | 18 +++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d83badec..0e5c5c62 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,17 @@ .DEFAULT_GOAL := all DOC_PATH=`pwd`/rocq-doc/ +GIT_HEAD=`git rev-parse HEAD` +GIT_COMMIT=${GIT_HEAD}`git diff --quiet HEAD || echo "-dirty"` .PHONY: all all: opam exec -- dune build --root . +.PHONY: show-config +show-config: + @echo "DOC_PATH="${DOC_PATH} + @echo "GIT_COMMIT="${GIT_COMMIT} + .PHONY: deps deps: create_switch ## Install development dependencies opam install -y ocamlformat=0.26.2 ocaml-lsp-server @@ -65,7 +72,7 @@ fmt: ## Format the codebase with ocamlformat .PHONY: watch watch: update-local-doc ## Watch for the filesystem and rebuild on every change - DOC_PATH=${DOC_PATH} opam exec -- dune build @run -w --force --no-buffer + DOC_PATH=${DOC_PATH} GIT_COMMIT=${GIT_COMMIT} opam exec -- dune build @run -w --force --no-buffer .PHONY: utop utop: ## Run a REPL and link with the project's libraries diff --git a/src/rocqproverorg_frontend/components/footer.eml b/src/rocqproverorg_frontend/components/footer.eml index 926b958a..d5f17c2a 100644 --- a/src/rocqproverorg_frontend/components/footer.eml +++ b/src/rocqproverorg_frontend/components/footer.eml @@ -142,9 +142,12 @@ let primary_footer () = <%s! icon "h-6 w-6" %> in + let link ~href ~name = + <%s name %> + in let footer_link ~href ~name =
  • - <%s name %> + <%s! link ~href ~name %>
  • in @@ -152,8 +155,8 @@ let primary_footer () =
    - " alt="OCaml"> - " alt="OCaml"> + " alt="Rocq"> + " alt="Rocq">