Browse Source

:beetle: Fix link in project cards

DricomDragon 1 year ago
parent
commit
ff2346e15c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      makefile
  2. 1 1
      src/templates/card.html

+ 1 - 1
makefile

@@ -22,7 +22,7 @@ DIST_EMB_FILES := $(EMBEDDED_FILES:src/%=$(DIST_DIR)/%)
 DIST_FILES := $(DIST_GEN_FILES) $(DIST_INC_FILES) $(DIST_DWN_FILES) $(DIST_EMB_FILES) $(DIST_DIR)/favicon.ico
 
 PANDOC_GEN := pandoc --standalone --wrap=none --template src/templates/main.html --metadata-file src/meta.yml
-LIST_GEN := yq eval-all '{"data": ., "source": filename} as $$item ireduce ([]; . + $$item) | {"list": .}'
+LIST_GEN := yq eval-all '{"data": ., "source": filename, "link": filename | sub("meta.yml", "html") | sub("src", "")} as $$item ireduce ([]; . + $$item) | {"list": .}'
 
 # Build
 .PHONY: build

+ 1 - 1
src/templates/card.html

@@ -9,7 +9,7 @@
         <p class="card-text">
             $it.data.content-description$
         </p>
-        <a href="todo" class="btn btn-success btn-block">
+        <a href="$it.link$" class="btn btn-success btn-block">
             Page du projet
         </a>
     </div>