diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index 5dc90e8..0000000 --- a/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env zsh - -rootdir=${0:h} -echo $rootdir - -./clean.sh -./build.sh -./pre-deploy.sh -./sync.sh diff --git a/build.sh b/engine/build.sh similarity index 81% rename from build.sh rename to engine/build.sh index 25b137c..c972ea8 100755 --- a/build.sh +++ b/engine/build.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +cd $(git rev-parse --show-toplevel) echo "* org-publish" emacs \ --load project.el \ diff --git a/clean.sh b/engine/clean.sh similarity index 71% rename from clean.sh rename to engine/clean.sh index eafd828..93d5c5b 100755 --- a/clean.sh +++ b/engine/clean.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +cd $(git rev-parse --show-toplevel) echo -n "* Clean site cache" rm -rf _site rm -rf _cache diff --git a/compresscss.sh b/engine/compresscss.sh similarity index 100% rename from compresscss.sh rename to engine/compresscss.sh diff --git a/engine/deploy.sh b/engine/deploy.sh new file mode 100755 index 0000000..6610eb4 --- /dev/null +++ b/engine/deploy.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env zsh + +cd $(git rev-parse --show-toplevel) +rootdir=${0:h} +echo $rootdir + +./engine/clean.sh +./engine/build.sh +./engine/pre-deploy.sh +./engine/sync.sh diff --git a/dup-for-themes.sh b/engine/dup-for-themes.sh similarity index 95% rename from dup-for-themes.sh rename to engine/dup-for-themes.sh index 5df31a7..f82e968 100755 --- a/dup-for-themes.sh +++ b/engine/dup-for-themes.sh @@ -2,6 +2,8 @@ #!nix-shell -i zsh #!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" +cd $(git rev-parse --show-toplevel) + webdir="_site" debug () { diff --git a/mkrss.sh b/engine/mkrss.sh similarity index 99% rename from mkrss.sh rename to engine/mkrss.sh index 80c4111..7ef49b0 100755 --- a/mkrss.sh +++ b/engine/mkrss.sh @@ -2,6 +2,7 @@ #!nix-shell -i zsh #!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" +cd $(git rev-parse --show-toplevel) # Directory webdir="_site" postsdir="$webdir/posts" diff --git a/optim-classes.sh b/engine/optim-classes.sh similarity index 97% rename from optim-classes.sh rename to engine/optim-classes.sh index 4cb9d0c..d632534 100755 --- a/optim-classes.sh +++ b/engine/optim-classes.sh @@ -1,5 +1,6 @@ #!/bin/zsh +cd $(git rev-parse --show-toplevel) webdir="_site" retrieve_classes_in_html () { diff --git a/optim-html.sh b/engine/optim-html.sh similarity index 94% rename from optim-html.sh rename to engine/optim-html.sh index d032bf5..2cf608d 100755 --- a/optim-html.sh +++ b/engine/optim-html.sh @@ -2,6 +2,7 @@ #!nix-shell -i zsh #!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" +cd $(git rev-parse --show-toplevel) webdir="_site" debug () { diff --git a/engine/pre-deploy.sh b/engine/pre-deploy.sh new file mode 100755 index 0000000..3e3969c --- /dev/null +++ b/engine/pre-deploy.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +cd $(git rev-parse --show-toplevel) +echo "Optim HTML size" +./engine/optim-html.sh +echo "Gen themes clones" +./engine/dup-for-themes.sh +echo "Optim Classes accross CSS/HTML" +./engine/optim-classes.sh +echo "Update file size" +./engine/update-file-size.sh +echo "Building RSS" +./engine/mkrss.sh diff --git a/serve.sh b/engine/serve.sh similarity index 58% rename from serve.sh rename to engine/serve.sh index 24465f0..9699415 100755 --- a/serve.sh +++ b/engine/serve.sh @@ -1,2 +1,4 @@ #!/usr/bin/env bash + +cd $(git rev-parse --show-toplevel) cd _site && sws -d --port 3001 . diff --git a/sign-project.sh b/engine/sign-project.sh similarity index 77% rename from sign-project.sh rename to engine/sign-project.sh index 1a1a7ff..be7debf 100755 --- a/sign-project.sh +++ b/engine/sign-project.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +cd $(git rev-parse --show-toplevel) signer=yann@esposito.host gpg --local-user $signer --output project.el.sig --detach-sign project.el diff --git a/sync.sh b/engine/sync.sh similarity index 84% rename from sync.sh rename to engine/sync.sh index 0e8b0ae..55f331f 100755 --- a/sync.sh +++ b/engine/sync.sh @@ -1,5 +1,6 @@ #!/usr/bin/env zsh +cd $(git rev-parse --show-toplevel) rootdir=${0:h} echo $rootdir diff --git a/update-file-size.sh b/engine/update-file-size.sh similarity index 97% rename from update-file-size.sh rename to engine/update-file-size.sh index 65171a2..a2a954c 100755 --- a/update-file-size.sh +++ b/engine/update-file-size.sh @@ -2,6 +2,7 @@ #!nix-shell -i zsh #!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" +cd $(git rev-parse --show-toplevel) webdir="_site" sizeof() { diff --git a/pre-deploy.sh b/pre-deploy.sh deleted file mode 100755 index 0d16574..0000000 --- a/pre-deploy.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -echo "Optim HTML size" -./optim-html.sh -echo "Gen themes clones" -./dup-for-themes.sh -echo "Optim Classes accross CSS/HTML" -./optim-classes.sh -echo "Update file size" -./update-file-size.sh -echo "Building RSS" -./mkrss.sh diff --git a/project.el b/project.el index d2eb329..e039004 100644 --- a/project.el +++ b/project.el @@ -229,7 +229,7 @@ Return output file name." filename dst-file))) ((string-match-p ".*\\.css$" filename) - (shell-command (format "%s/compresscss.sh %s %s" root-dir filename dst-file))) + (shell-command (format "%s/engine/compresscss.sh %s %s" root-dir filename dst-file))) (t (copy-file filename dst-file t)))))) (defalias 'org-blog-posts-sitemap-fn @@ -291,4 +291,17 @@ Return output file name." (add-to-list 'org-export-filter-link-functions 'my-org-export-add-target-blank-to-http-links) +(defun my-org-export-add-file-links + (text backend info) + "Add a link to the tangled file before the code." + (when (and + (org-export-derived-backend-p backend 'html) + (string-match "href=\"http[^\"]+" text) + (not (string-match "target=\"" text)) + (not (string-match (concat "href=\"" domainname "[^\"]*") text))) + (string-match " input { :root { --b2: #fff; --b3: #fffa; - --y: #ca2; - --o: #a65; - --r: #b56;} + --y: #da2; + --o: #d72; + --r: #c33;} /* --------------------------------------------------------------------------- */ /* Default color theme */ /* colors theme */ @@ -44,10 +37,10 @@ body > input { @media (prefers-color-scheme: dark) { body { background: #000; - color: #bbb; + color: #ddd; } - a { color: #8cf } - a:visited { color: #fcf } + a { color: #38c } + a:visited { color: #83c } img { filter: brightness(0.8); } @@ -56,10 +49,10 @@ body > input { /* Manually checked colortheme */ #d:checked ~ * { background: #000; - color: #bbb; + color: #ddd; } -#d:checked ~ * a { color: #8cf; } -#d:checked ~ * a:visited { color: #fcf; } +#d:checked ~ * a { color: #38c; } +#d:checked ~ * a:visited { color: #83c; } /* --------------------------------------------------------------------------- */ /* Light theme selected */ diff --git a/src/css/mk.css b/src/css/mk.css index e628d93..35eac58 100644 --- a/src/css/mk.css +++ b/src/css/mk.css @@ -6,7 +6,8 @@ --lh: 16px; } body { - font: 14px/1.4 monospace; + font-size: 14px/1.4; + font-family: Menlo, monaco, monospace; line-height: var(--lh); } pre, pre code { @@ -246,7 +247,7 @@ figure, .figure { --bg: var(--b03); --fg: var(--b0); --bg2: var(--b02); - --fg2: var(--b01); + --fg2: var(--b1); --rfg: var(--b1); --rbg: var(--b02); --bdr: var(--b02); diff --git a/src/posts/0010-Haskell-Now/index.org b/src/posts/0010-Haskell-Now/index.org index 589bf79..0ce5308 100644 --- a/src/posts/0010-Haskell-Now/index.org +++ b/src/posts/0010-Haskell-Now/index.org @@ -160,12 +160,12 @@ The article contains five parts: - More on infinite tree; a more math oriented discussion about infinite trees -** Helpers :noexport: +** Helpers :noexport: :PROPERTIES: :CUSTOM_ID: helpers :END: -#+MACRO: lnk @@html:$1 ⤓@@ +#+MACRO: lnk @@html:$1 ⤓@@ ** Install :PROPERTIES: