Browse Source

upgraded

wip
parent
commit
ee600f4f50
Signed by: yogsototh GPG Key ID: 7B19A4C650D59646
  1. 2
      tools/auto-update
  2. 5
      tools/fastpublish.sh
  3. 2
      tools/new_blog_entry
  4. 6
      tools/publish.sh
  5. 6
      tools/update-from-multi
  6. 10
      yblog.cabal

2
tools/auto-update

@ -33,8 +33,10 @@ esac
echo $serverpid $sasspid > .last_multi_watched
cd content
stack exec yblog watch &
cd ..
while true; do
./update-from-multi
((ONCE == 1)) && break

5
tools/fastpublish.sh

@ -1,8 +1,7 @@
#!/usr/bin/env zsh
hakylldir=$HOME/Sites/yblog
pubdir=$hakylldir/_publish
hakylldir=$0/..
pubdir=$hakylldir/content/_publish
[[ ! -e $pubdir ]] && \
cd ${pubdir:h} && \

2
tools/new_blog_entry

@ -14,7 +14,7 @@ title="$*"
# CONFIG
blog_dir="multi/blog"
image_blog_dir="Scratch/img/blog"
image_blog_dir="content/Scratch/img/blog"
# basefilename is the filename where all spaces
# were replaced by '-'

6
tools/publish.sh

@ -1,6 +1,8 @@
#!/usr/bin/env zsh
./update-from-multi && \
./tools/update-from-multi && \
cd content/ && \
stack exec yblog clean && \
stack exec yblog build && \
./fastpublish.sh
cd .. && \
./tools/fastpublish.sh

6
tools/update-from-multi

@ -1,7 +1,7 @@
#!/usr/bin/env zsh
#
languages=( $(stack runghc showlangs.hs) )
((${#languages} == 0)) && error "Couldn't retrieve languages [runghc -package-db=$packageconf showlang.hs]"
languages=( $(stack exec -- showlangs) )
((${#languages} == 0)) && error "Couldn't retrieve languages [stack exec -- showlangs]"
print "languages to watch (in Config.hs) are: $languages"
typeset -a exclu
@ -14,7 +14,7 @@ for language in $languages; do
exclu=( $exclu $l )
done
for fic in multi/**/*(.); do
dest=Scratch/$language/${fic#multi/}
dest=content/Scratch/$language/${fic#multi/}
[[ ! -e $dest || $fic -nt $dest ]] || continue
print $dest
[[ ! -d ${dest:h} ]] && mkdir ${dest:h}

10
yblog.cabal

@ -14,6 +14,14 @@ category: Web
build-type: Simple
cabal-version: >=1.8
executable showlangs
main-is: showlangs.hs
hs-source-dirs: src
ghc-options: -O2 -Wall
other-modules: Config
build-depends: base
, hakyll
executable yblog
main-is: site.hs
hs-source-dirs: src
@ -22,7 +30,7 @@ executable yblog
, Config
, Multilang
, YFilters
build-depends: base
build-depends: base
, containers
, hakyll
, filepath

Loading…
Cancel
Save