Improve min* scripts, add a new subdomain: https://etc.ari-web.xyz/

Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
Ari Archer 2022-10-01 02:24:46 +03:00
parent 63f4c3bdc7
commit 8441a4e6ac
7 changed files with 9 additions and 7 deletions

View file

@ -6,11 +6,12 @@ netlifyapis:
clean: clean:
[ -z "${CI}" ] || rm -rfv requirements.txt \ [ -z "${CI}" ] || rm -rfv requirements.txt \
runtime.txt \
README.md \ README.md \
git.sh \ git.sh \
scripts \ scripts \
.vscode \ .vscode \
.github \ .github
netlify: build netlifyapis clean netlify: build netlifyapis clean

View file

@ -79,3 +79,4 @@ how much per avg sites are using:
- https://school.ari-web.xyz/ (source: proprietary (I don't want people snooping on my homework lol)) - https://school.ari-web.xyz/ (source: proprietary (I don't want people snooping on my homework lol))
- https://user.ari-web.xyz/ (source: https://user.ari-web.xyz/git) - https://user.ari-web.xyz/ (source: https://user.ari-web.xyz/git)
- https://3.ari-web.xyz/ (source: https://3.ari-web.xyz/git) - https://3.ari-web.xyz/ (source: https://3.ari-web.xyz/git)
- https://etc.ari-web.xyz/ (source: https://etc.ari-web.xyz/git)

View file

@ -9,7 +9,7 @@
<meta name="description" content="My personal website" /> <meta name="description" content="My personal website" />
<meta <meta
name="keywords" name="keywords"
content="website, webdev, linux, programming, ari, terminal, dark, blog, javascript, opensource, free" content="website, webdev, linux, programming, ari, ari-web, Ari Archer, terminal, dark, blog, javascript, opensource, free"
/> />
<meta <meta
name="robots" name="robots"

View file

@ -4,7 +4,7 @@ set -e
main() { main() {
echo '>> Removing all .min.css files' echo '>> Removing all .min.css files'
find content/ -name '*.min.css' -type f -exec rm -rfv {} \; find content/ -not -ipath "./node_modules/*" -name '*.min.css' -type f -exec rm -rfv {} \;
} }
main "$@" main "$@"

View file

@ -6,7 +6,7 @@ main() {
if [ "$CI" ]; then if [ "$CI" ]; then
echo 'Minifying all HTML' echo 'Minifying all HTML'
find . -type f -name "*.html" \ find . -not -ipath "./node_modules/*" -type f -name "*.html" \
-exec html-minifier --collapse-whitespace --collapse-inline-tag-whitespace --remove-tag-whitespace -o {}.min {} \; \ -exec html-minifier --collapse-whitespace --collapse-inline-tag-whitespace --remove-tag-whitespace -o {}.min {} \; \
-exec rm {} \; \ -exec rm {} \; \
-exec mv {}.min {} \; \ -exec mv {}.min {} \; \

View file

@ -6,7 +6,7 @@ main() {
if [ "$CI" ]; then if [ "$CI" ]; then
echo 'Minifying all JavaScript' echo 'Minifying all JavaScript'
find content/js/ -type f \ find content/js/ -not -ipath "./node_modules/*" -type f \
-name "*.js" ! -name "*.min.*" ! -name "vfs_fonts*" \ -name "*.js" ! -name "*.min.*" ! -name "vfs_fonts*" \
-exec uglifyjs --compress sequences=true,conditionals=true,booleans=true -o {}.min {} \; \ -exec uglifyjs --compress sequences=true,conditionals=true,booleans=true -o {}.min {} \; \
-exec rm {} \; \ -exec rm {} \; \

View file

@ -3,7 +3,7 @@
set -e set -e
main() { main() {
for file in $(find content/ -name '*.scss' -type f); do for file in $(find content/ -not -ipath "./node_modules/*" -name '*.scss' -type f); do
bnam="${file##*/}" bnam="${file##*/}"
out="${file%/*}/${bnam%.*}.min.css" out="${file%/*}/${bnam%.*}.min.css"
@ -19,7 +19,7 @@ main() {
wait wait
echo " >> Removing residuals" echo " >> Removing residuals"
find content/ -name '_*.min.css' -or \ find content/ -not -ipath "./node_modules/*" -name '_*.min.css' -or \
-name '*.sass.css' -type f -exec rm -rfv {} \; -name '*.sass.css' -type f -exec rm -rfv {} \;
} }