about summary refs log tree commit diff
path: root/.build.yml
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2021-05-08 22:12:40 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2021-05-08 22:12:40 +0700
commitcfe47619942f4416878ce3680eb09d28fcddadc4 (patch)
tree68fa3665beaa504d9e724637ed588b85cc1edcaf /.build.yml
parentbd920f04cc5c274d9cd76e420b88a567b5c1aec9 (diff)
downloadblog-cfe47619942f4416878ce3680eb09d28fcddadc4.tar.gz
Use hugo for generating markdown
Diffstat (limited to '.build.yml')
-rw-r--r--.build.yml15
1 files changed, 9 insertions, 6 deletions
diff --git a/.build.yml b/.build.yml
index 9ad24cb..038ff62 100644
--- a/.build.yml
+++ b/.build.yml
@@ -3,21 +3,24 @@ oauth: pages.sr.ht/PAGES:RW
 packages:
   - golang
   - hugo
-  - cargo
 environment:
   site: huyngo.srht.site
 tasks:
 - install: |
-    cargo install mdbook
     git clone https://git.sr.ht/~sircmpwn/openring
     cd openring
     go build -o openring
     sudo cp openring /usr/local/bin/
-- package: |
+- embed:
     git clone https://git.disroot.org/huyngo/conlang
-    cd conlang
-    /home/build/.cargo/bin/mdbook build
-    cd ..
+    cp -r conlang/src $site/content/conlang
+    cd $site/content/conlang
+    mv index.md _index.md
+    sed "s/\//_/g" SUMMARY.md | sed "s/\._/.\//g" | sed "s/.md/\//g" | grep -v "Introduction" >> _index.md
+    rm SUMMARY.md
+    for file in $(find -type f); do ../../add-front-matter.sh $file; done
+    find -type f | grep "sh$" | xargs rm
+- package: |
     cd $site
     ./create-webring.sh
     hugo