-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
72 lines (57 loc) · 1.9 KB
/
build.sh
File metadata and controls
72 lines (57 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
hugo version
firefox http://localhost:1313/
hugo server
# Compila md para html.
Rscript -e\
"library(rmarkdown); \
render('./content/dsbd-content.md',\
output_format = 'html_fragment',\
output_dir = './themes/hugo-universal-theme/layouts/partials/')"
# Transfere.
mv -v dsbd-content.html ./themes/hugo-universal-theme/layouts/partials/
# Usando uma versão mais recente do hugo.
# Visitei:
# firefox https://github.com/gohugoio/hugo/releases
# Baixei:
# wget https://github.com/gohugoio/hugo/releases/download/v0.31.1/hugo_0.31.1_Linux-64bit.deb -P ~/Downloads
# Instalei:
# sudo dpkg -i ~/Downloads/hugo_0.31.1_Linux-64bit.deb
# Encontra onde está e exibe versão para confirmar.
whereis hugo
/usr/local/bin/hugo version
pwd
# Roda hugo server.
/usr/local/bin/hugo server
# Roda hugo para gerar pasta pública.
/usr/local/bin/hugo
# Arquivos de estilo do tema.
find -name *.css
# Colocar CSS no
# ./themes/hugo-universal-theme/static/css/style.default.css
(find-file "/home/walmes/repos/dsbd/themes/hugo-universal-theme/static/css/style.default.css")
# Imagens da parte estática do site estão em
# /home/walmes/repos/dsbd/themes/hugo-universal-theme/static/img
# Exibe o tamanho das imagens.
identify ./static/img/instructors/*
# https://superuser.com/questions/275476/square-thumbnails-with-imagemagick-convert
# cd ./static/img/icons/
# identify *
# ls
# mkdir bkp/
# mv -v * bkp/
# ls bkp
# rm *.png
# for pic in `ls bkp`; do
# filename="${pic%.*}"
# echo $filename
# convert bkp/$pic[180x] $filename.png
# convert $filename.png -gravity center -extent 180x180 +profile "*" $filename.png
# done
#-----------------------------------------------------------------------
# Deploy.
# Gera o diretório public/
hugo
# Transfere arquivos.
rsync -avzp ./public/* --progress ${USER}@${PATAXO}:~/public_html/dsbd/
# Abre no navegador.
firefox leg.ufpr.br/~walmes/dsbd