script move

This commit is contained in:
Yann Esposito (Yogsototh) 2020-02-09 12:57:46 +01:00
parent 5b13f77fe1
commit fe98c7dd13
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
19 changed files with 64 additions and 43 deletions

View file

@ -1,9 +0,0 @@
#!/usr/bin/env zsh
rootdir=${0:h}
echo $rootdir
./clean.sh
./build.sh
./pre-deploy.sh
./sync.sh

View file

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd $(git rev-parse --show-toplevel)
echo "* org-publish" echo "* org-publish"
emacs \ emacs \
--load project.el \ --load project.el \

View file

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd $(git rev-parse --show-toplevel)
echo -n "* Clean site cache" echo -n "* Clean site cache"
rm -rf _site rm -rf _site
rm -rf _cache rm -rf _cache

10
engine/deploy.sh Executable file
View file

@ -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

View file

@ -2,6 +2,8 @@
#!nix-shell -i zsh #!nix-shell -i zsh
#!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" #!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz"
cd $(git rev-parse --show-toplevel)
webdir="_site" webdir="_site"
debug () { debug () {

View file

@ -2,6 +2,7 @@
#!nix-shell -i zsh #!nix-shell -i zsh
#!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" #!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz"
cd $(git rev-parse --show-toplevel)
# Directory # Directory
webdir="_site" webdir="_site"
postsdir="$webdir/posts" postsdir="$webdir/posts"

View file

@ -1,5 +1,6 @@
#!/bin/zsh #!/bin/zsh
cd $(git rev-parse --show-toplevel)
webdir="_site" webdir="_site"
retrieve_classes_in_html () { retrieve_classes_in_html () {

View file

@ -2,6 +2,7 @@
#!nix-shell -i zsh #!nix-shell -i zsh
#!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" #!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz"
cd $(git rev-parse --show-toplevel)
webdir="_site" webdir="_site"
debug () { debug () {

13
engine/pre-deploy.sh Executable file
View file

@ -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

View file

@ -1,2 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd $(git rev-parse --show-toplevel)
cd _site && sws -d --port 3001 . cd _site && sws -d --port 3001 .

View file

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd $(git rev-parse --show-toplevel)
signer=yann@esposito.host signer=yann@esposito.host
gpg --local-user $signer --output project.el.sig --detach-sign project.el gpg --local-user $signer --output project.el.sig --detach-sign project.el

View file

@ -1,5 +1,6 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
cd $(git rev-parse --show-toplevel)
rootdir=${0:h} rootdir=${0:h}
echo $rootdir echo $rootdir

View file

@ -2,6 +2,7 @@
#!nix-shell -i zsh #!nix-shell -i zsh
#!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" #!nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz"
cd $(git rev-parse --show-toplevel)
webdir="_site" webdir="_site"
sizeof() { sizeof() {

View file

@ -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

View file

@ -229,7 +229,7 @@ Return output file name."
filename filename
dst-file))) dst-file)))
((string-match-p ".*\\.css$" filename) ((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)))))) (t (copy-file filename dst-file t))))))
(defalias 'org-blog-posts-sitemap-fn (defalias 'org-blog-posts-sitemap-fn
@ -291,4 +291,17 @@ Return output file name."
(add-to-list 'org-export-filter-link-functions (add-to-list 'org-export-filter-link-functions
'my-org-export-add-target-blank-to-http-links) '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 "<a " text)
(replace-match "<a target=\"_blank\" rel=\"noopener noreferrer\" " nil nil text)))
(add-to-list 'org-export-filter-code-functions
'my-org-export-add-file-links)
(provide 'her-esy-fun-publish) (provide 'her-esy-fun-publish)

View file

@ -1,16 +1,9 @@
/* Fonts */ /* Fonts */
html,body { html,body {
font: 16px/1.4 sans-serif; font-family: Menlo, monaco, monospace;
line-height: 1.5em; line-height: 1.5em;
margin:0;
padding:0;
}
pre, pre code {
line-height: 1em;
font-size: .8em;
} }
img { width: 100%; } img { width: 100%; }
label {color:#b56;}
label:hover { cursor:pointer; } label:hover { cursor:pointer; }
#content,.content { #content,.content {
max-width: 48em; max-width: 48em;
@ -34,9 +27,9 @@ body > input {
:root { :root {
--b2: #fff; --b2: #fff;
--b3: #fffa; --b3: #fffa;
--y: #ca2; --y: #da2;
--o: #a65; --o: #d72;
--r: #b56;} --r: #c33;}
/* --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- */
/* Default color theme */ /* Default color theme */
/* colors theme */ /* colors theme */
@ -44,10 +37,10 @@ body > input {
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
body { body {
background: #000; background: #000;
color: #bbb; color: #ddd;
} }
a { color: #8cf } a { color: #38c }
a:visited { color: #fcf } a:visited { color: #83c }
img { img {
filter: brightness(0.8); filter: brightness(0.8);
} }
@ -56,10 +49,10 @@ body > input {
/* Manually checked colortheme */ /* Manually checked colortheme */
#d:checked ~ * { #d:checked ~ * {
background: #000; background: #000;
color: #bbb; color: #ddd;
} }
#d:checked ~ * a { color: #8cf; } #d:checked ~ * a { color: #38c; }
#d:checked ~ * a:visited { color: #fcf; } #d:checked ~ * a:visited { color: #83c; }
/* --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- */
/* Light theme selected */ /* Light theme selected */

View file

@ -6,7 +6,8 @@
--lh: 16px; --lh: 16px;
} }
body { body {
font: 14px/1.4 monospace; font-size: 14px/1.4;
font-family: Menlo, monaco, monospace;
line-height: var(--lh); line-height: var(--lh);
} }
pre, pre code { pre, pre code {
@ -246,7 +247,7 @@ figure, .figure {
--bg: var(--b03); --bg: var(--b03);
--fg: var(--b0); --fg: var(--b0);
--bg2: var(--b02); --bg2: var(--b02);
--fg2: var(--b01); --fg2: var(--b1);
--rfg: var(--b1); --rfg: var(--b1);
--rbg: var(--b02); --rbg: var(--b02);
--bdr: var(--b02); --bdr: var(--b02);

View file

@ -160,12 +160,12 @@ The article contains five parts:
- More on infinite tree; a more math oriented discussion about - More on infinite tree; a more math oriented discussion about
infinite trees infinite trees
** Helpers :noexport: ** Helpers :noexport:
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: helpers :CUSTOM_ID: helpers
:END: :END:
#+MACRO: lnk @@html:<a href="$1" style="float:right" target="_blank">$1 ⤓</a>@@ #+MACRO: lnk @@html:<a href="$1" class="codefile" target="_blank">$1 ⤓</a>@@
** Install ** Install
:PROPERTIES: :PROPERTIES: