From 1caaf4edbd23c3dd805fbc519da6c2007f73d77a Mon Sep 17 00:00:00 2001 From: Miguel Date: Tue, 19 Feb 2019 17:16:35 +0100 Subject: fix paths --- Makefile | 2 ++ src/WWWStaticusPlugins.hs | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9f14fd7..d862bfc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ INDIR=/home/miguel/git/idziorek_net +OUTDIR=/mnt/andromeda/htmlpub/idziorek_net OUTDIR=/tmp/idziorek_net +HTMLROOT=https://www.idziorek.net HTMLROOT=/tmp/idziorek_net run: build clean diff --git a/src/WWWStaticusPlugins.hs b/src/WWWStaticusPlugins.hs index 6718977..fe509f3 100644 --- a/src/WWWStaticusPlugins.hs +++ b/src/WWWStaticusPlugins.hs @@ -80,8 +80,8 @@ staticusPluginInit = StaticusPlugin "init" id runIO c <- getDirList (par "path" m) t <- getDirList (par "dir_in" m) - let menutop= concat $ map (\x->"
  • =1 && brc!!0==x then " active" else "")++"\">"++x++"
  • ") (menu t) - let submenu= if isHome then "" else concat $ map (\x->"
  • "++cln x++"
  • ") (menu c) + let menutop= concat $ map (\x->"
  • =1 && brc!!0==x then " active" else "")++"\">"++x++"
  • ") (menu t) + let submenu= if isHome then "" else concat $ map (\x->"
  • "++cln x++"
  • ") (menu c) let breadcrumbs=concat $ map (\(x,d)->"
  • "++(if d==0 then "" else "")++cln x++(if d==0 then "" else "")++"
  • ") (zip ("home":brc) [brcl,brcl-1..]) md <- readFile $ par "path" m++"/"++"index.md" @@ -96,6 +96,8 @@ staticusPluginInit = StaticusPlugin "init" id runIO ]) m where outdir = par "dir_out" m ++ "/" ++ intercalate "/" brc + htmlroot_dir = htmlroot ++ "/" ++ intercalate "/" brc + htmlroot = par "html_root" m brc = remUnder $ splitOn "/" (drop (length (par "dir_in" m)) (par "path" m)) brcl = length brc remUnder = filter (not.null) . map (dropWhile(=='_').dropWhile(/='_')) -- cgit v1.2.3