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
cd $(git rev-parse --show-toplevel)
echo "* org-publish"
emacs \
--load project.el \

View File

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

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 nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz"
cd $(git rev-parse --show-toplevel)
webdir="_site"
debug () {

View File

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

View File

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

View File

@ -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 () {

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
cd $(git rev-parse --show-toplevel)
cd _site && sws -d --port 3001 .

View File

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

View File

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

View File

@ -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() {

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
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 "<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)

View File

@ -1,16 +1,9 @@
/* Fonts */
html,body {
font: 16px/1.4 sans-serif;
font-family: Menlo, monaco, monospace;
line-height: 1.5em;
margin:0;
padding:0;
}
pre, pre code {
line-height: 1em;
font-size: .8em;
}
img { width: 100%; }
label {color:#b56;}
label:hover { cursor:pointer; }
#content,.content {
max-width: 48em;
@ -34,9 +27,9 @@ body > 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 */

View File

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

View File

@ -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:<a href="$1" style="float:right" target="_blank">$1 ⤓</a>@@
#+MACRO: lnk @@html:<a href="$1" class="codefile" target="_blank">$1 ⤓</a>@@
** Install
:PROPERTIES: