Browse Source

Update dev script

merge-yannesposito
parent
commit
174fd595c3
Signed by: yogsototh GPG Key ID: 7B19A4C650D59646
  1. 2
      Shakefile.hs
  2. 9
      engine/auto-build.sh
  3. 11
      engine/dev.sh
  4. 1
      shell.nix
  5. 7
      src/css/y.css
  6. 4
      templates/post.mustache

2
Shakefile.hs

@ -198,7 +198,7 @@ buildArchive getPosts getTemplate out = do
postInfo :: BlogPost -> Text
postInfo bp =
"- " <> date <> ": " <> orglink
"| " <> date <> " | " <> orglink <> " |"
where
date = T.takeWhile (/= ' ') (postDate bp)
orglink = "[[file:" <> (toS (postUrl bp)) <> "][" <> (postTitle bp) <> "]]"

9
engine/auto-build.sh

@ -0,0 +1,9 @@
#!/usr/bin/env zsh
cd "$(git rev-parse --show-toplevel)" || exit 1
direnv reload
echo "Watching $PWD/{src,templates}"
# fswatch --exclude='\\.#' src | while read event; do
fswatch --exclude='^.*\.#.*$' src templates | while read event; do
echo "$event"
./engine/build.sh fast
done

11
engine/dev.sh

@ -1,8 +1,7 @@
#!/usr/bin/env zsh
cd "$(git rev-parse --show-toplevel)" || exit 1
echo "Watching $PWD/{src,templates}"
# fswatch --exclude='\\.#' src | while read event; do
fswatch --exclude='^.*\.#.*$' src templates | while read event; do
echo "$event"
./engine/build.sh fast
done
tmux \
new-session './engine/auto-build.sh' \; \
split-window './engine/serve.sh' \; \
split-window 'lorri watch' \; \
select-layout even-vertical

1
shell.nix

@ -27,6 +27,7 @@ pkgs.mkShell {
git
direnv
haskellPackages.shake
tmux
# for emacs dev
ripgrep
];

7
src/css/y.css

@ -15,7 +15,7 @@ pre > code { background: none; font-size: 0.875em; }
code,pre { font-family: Menlo, Monaco, monospace; font-size: 1.85ex; }
figure { margin: 1rem 0; padding: 0; }
.meta { font-size: small;}
.abstract { margin: 2rem 4rem; font-size: 0.875em; font-style: italic; }
.abstract { margin: 2rem 10%; font-size: 0.875em; font-style: italic; }
#logo { display: inline-block;
vertical-align: middle;}
#logo svg { width: 3em; }
@ -229,12 +229,9 @@ input#b:checked ~ div {
--fg0: var(--b1);
--rfg: var(--b01);
font-family: Hoefler Text, serif;
font-size: 21px;
font-size: 18px;
line-height: 1.35em;
}
input#b:checked ~ div #content {
overflow: visible;
}
input#b:checked ~ div img {
border: solid 1px;
filter: brightness(0.8) sepia(30%) saturate(0.8);

4
templates/post.mustache

@ -7,7 +7,9 @@
<meta name="author" content="{{author}}">
<meta name="description" content="{{description}}">
<meta name="keywords" content="{{#tags}}{{.}}{{^last}} {{/last}}{{/tags}}">
<link rel="stylesheet" href="/css/y.css"/><link rel="alternate" type="application/rss+xml" href="/rss.xml" /><link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/css/y.css"/>
<link rel="alternate" type="application/rss+xml" href="/rss.xml" />
<link rel="icon" href="/favicon.ico">
</head>
<body>
{{>header}}

Loading…
Cancel
Save