Moving config.sh to example and git ignoring config.sh
This commit is contained in:
parent
5ec3c6130c
commit
0024f62f27
|
@ -0,0 +1 @@
|
|||
config.sh
|
|
@ -1,7 +1,9 @@
|
|||
a simple note taking system, that also generates weboages with rss feeds!
|
||||
made with bash.
|
||||
|
||||
copy `config.example.sh` to `config.sh` and edit before generating your notes!
|
||||
|
||||
### see noter.sh for generation time options
|
||||
### place your notes onto a foldier named "notes" in the directory noter.sh is in!
|
||||
|
||||
example of what a page looks like: https://k0.tel/
|
||||
example of what a page looks like: https://k0.tel/
|
||||
|
|
|
@ -8,6 +8,8 @@ site_description="thoughts about mainly computers... maybe recipes and cats too?
|
|||
site_link="https://k0.tel/"
|
||||
publish_dir="."
|
||||
|
||||
top_menu="<a rel='me' href='https://layer8.space/@k'>fedi</a> | <a href=feed.xml>rss</a> | <a href=https://the-sauna.icu/>sauna</a>"
|
||||
|
||||
# Put CSS between <<EOF and EOF
|
||||
site_css=$(cat <<EOF
|
||||
/* font by https://www.1001fonts.com/users/junkohanhero/ */
|
10
noter.sh
10
noter.sh
|
@ -13,6 +13,8 @@ nlog() {
|
|||
nlog "sourcing config.sh"
|
||||
noter_dir=$(dirname "$0")
|
||||
source $noter_dir/config.sh
|
||||
# Load config overrides from a non-vcs file
|
||||
source $noter_dir/config_local.sh
|
||||
|
||||
# Override publish dir if passed as cli arg
|
||||
[[ ! -z "$1" ]] && nlog "overriding publish_dir to $1" && publish_dir="$1"
|
||||
|
@ -85,7 +87,7 @@ generate_top_year_bar() {
|
|||
# feed going goddamit!
|
||||
generate_rss_feed() {
|
||||
nlog "generating rss feed"
|
||||
local rss_file="feed.xml"
|
||||
local rss_file="$publish_dir/feed.xml"
|
||||
local rss_pubdate=$(date -u +"%a, %d %b %Y %H:%M:%S GMT")
|
||||
|
||||
xml_escape() {
|
||||
|
@ -147,7 +149,7 @@ echo "<!DOCTYPE html>
|
|||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>$notecount notes | noter</title>
|
||||
<title>$notecount notes | $site_title</title>
|
||||
<meta property='og:title' content='$site_title' />
|
||||
<meta property='og:description' content='$site_description' />
|
||||
<meta property='og:type' content='blog' />
|
||||
|
@ -163,7 +165,7 @@ echo "<!DOCTYPE html>
|
|||
<body>
|
||||
<div class='container'>
|
||||
<h1>$site_title</h1><br>
|
||||
<center> <a rel='me' href='https://layer8.space/@k'>fedi</a> | <a href="feed.xml">rss</a> | <a href="https://the-sauna.icu/">sauna</a> </center>" >"$output_file"
|
||||
<center>$top_menu</center>" >"$output_file"
|
||||
generate_top_year_bar >>"$output_file"
|
||||
|
||||
# loop for every note in notes
|
||||
|
@ -180,7 +182,7 @@ done
|
|||
|
||||
# bottom navigation
|
||||
nlog "applying settings"
|
||||
checksetting "<div class='generated-with'>generated with <a href='https://git.sr.ht/~koutsie/noter'>noter</a></div>" "$showgenerator"
|
||||
checksetting "<div class='generated-with'>generated with <a href='https://code.criminallycute.fi/siina/noter'>noter</a></div>" "$showgenerator"
|
||||
checksetting "<div class='back-to-top'><a href='#'>Back to Top</a></div>" "$backtotop"
|
||||
checksetting "<div class='last-updated'>last Updated: $(date +"%Y-%m-%d %H:%M:%S")</div>" "$lastupdated"
|
||||
|
||||
|
|
Loading…
Reference in New Issue