diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2020-12-09 03:03:05 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2020-12-09 03:03:05 +0300 |
| commit | df5b75a6f759222b487691422b2b76fdfd85bb21 (patch) | |
| tree | bf5fcc8ff0e06270873caa832728ffaf39f80667 | |
| parent | 89d1b3e7b1937f665d1d898cd9d9e1076aeddedb (diff) | |
| download | aaoth.xyz-df5b75a6f759222b487691422b2b76fdfd85bb21.tar.gz aaoth.xyz-df5b75a6f759222b487691422b2b76fdfd85bb21.zip | |
add new post and tweak filter-by-tag page
| -rw-r--r-- | _config.yml | 2 | ||||
| -rw-r--r-- | _layouts/tagsort.html | 20 | ||||
| -rw-r--r-- | _posts/2020-12-06-fossil-to-git.md | 4 | ||||
| -rw-r--r-- | _posts/2020-12-09-fossil-autoupdate-cronjob.md | 67 | ||||
| -rw-r--r-- | other.md | 4 | ||||
| -rw-r--r-- | tags/openbsd.md | 5 |
6 files changed, 93 insertions, 9 deletions
diff --git a/_config.yml b/_config.yml index a9692bb..d762f21 100644 --- a/_config.yml +++ b/_config.yml @@ -5,6 +5,8 @@ exclude: - LICENSE - README.md +excerpt_separator: <!--more--> + defaults: - scope: diff --git a/_layouts/tagsort.html b/_layouts/tagsort.html index f9cd008..4265df2 100644 --- a/_layouts/tagsort.html +++ b/_layouts/tagsort.html @@ -4,9 +4,17 @@ layout: default <h1>{{ page.tag }}</h1> -<ul> - {% for post in site.tags[page.tag] %} - <li>{{ post.date | date: "%F" }}: <a href="{{ post.url }}"> {{ post.title }}</a> - </li> - {% endfor %} -</ul> +<div class="posts"> +{% for post in site.tags[page.tag] %} + <div class="post"> + <h2 id="{{ post.title | slugify }}"> + <a href="{{ post.url }}">{{ post.title }}</a> + </h2> + {{ post.excerpt }} + <p> + <a href="{{ post.url }}">read more...</a> + </p> + <small><p>{{ post.date | date_to_string }}</p></small> + </div> +{% endfor %} +</div> diff --git a/_posts/2020-12-06-fossil-to-git.md b/_posts/2020-12-06-fossil-to-git.md index 651e661..cacb4c9 100644 --- a/_posts/2020-12-06-fossil-to-git.md +++ b/_posts/2020-12-06-fossil-to-git.md @@ -1,8 +1,7 @@ --- title: fossil export to git author: la-ninpre -tags: [fossil, git, tutorial] -excerpt_separator: <!--more--> +tags: fossil git tutorial --- i was trying to export my website repo to fossil using suggested method from @@ -11,6 +10,7 @@ i was trying to export my website repo to fossil using suggested method from ``` git fast-export --all | fossil import --git repo.fossil ``` + [1]:https://www.fossil-scm.org/home/doc/trunk/www/inout.wiki but i didn't like that fossil recognizes my email as username and so commit diff --git a/_posts/2020-12-09-fossil-autoupdate-cronjob.md b/_posts/2020-12-09-fossil-autoupdate-cronjob.md new file mode 100644 index 0000000..70f8fc8 --- /dev/null +++ b/_posts/2020-12-09-fossil-autoupdate-cronjob.md @@ -0,0 +1,67 @@ +--- +title: auto-update fossil using cron(8) +tags: openbsd tutorial fossil +date: 2020-12-09T01:37+03:00 +--- + +i'm running an instance of fossil on my openbsd server (it's the same that is +powering this website) and for some reason i want it to be up-to-date. more +presicely, bleeding edge. + +<!--more--> + +for that i added this part to my `daily.local` script (for those of you who +don't know, it's script that running every day by cron(8)): + +``` +cd /root/fossil && \ + /usr/local/bin/fossil up | \ + awk '/changes:/ { + if ($2 == "None."){ + print "No changes, exiting..."; + exit 1 + }else{ + out=""; + for(i=2; i<=NF; i++){ + out=out" "$i + }; + } + print out; + exit 0 + }' && \ + /usr/local/bin/fossil revert src/repolist.c >/dev/null && \ + patch src/repolist.c /var/www/htdocs/fsl.aaoth.xyz/repolist.c.patch \ + >/dev/null && \ + ./configure --static >/dev/null && \ + make >/dev/null && \ + cp fossil /var/www/bin && \ + make distclean >/dev/null && \ + /usr/local/bin/fossil stat +``` + +it is very straightforward and simple. firstly, it's changing directory into +place, where i have fossil checkout (made with `fossil clone` and +`fossil open`). then it runs `fossil up` and piping it to a small awk script +that is checking, is there any changes pulled down. + +after that there's one interesting part. `fossil revert src/repolist.c` is there +because i modified it a little bit to make my [repolist][1] page look better. +after my edits, i exported a patch by executing: + +``` +fossil diff > repolist.c.patch +``` + +maybe it would be better if i committed those changes, but i don't want to hold +a full fossil repo among my other fossils, because its history is fairly long. +and also i'm not very good at c programming, so i'll keep it as is for now. +if you're interested this patch is free to use and you can [check it out][2]. + +after that, there's just a normal configure and make procedure and also final +cleanup. + +i also have a mail server running there, so i get an email of what changes were +applied and that everything went fine. + +[1]:https://fsl.aaoth.xyz +[2]:https://fsl.aaoth.xyz/repolist.c.patch @@ -3,7 +3,9 @@ title: other permalink: /other/ --- -miscellaneous posts about different things. +# miscellaneous posts + +about different things filter by tag: {% for tag in site.tags %}[{{ tag[0] }}](/tags/{{ tag[0] }}) {% endfor %} diff --git a/tags/openbsd.md b/tags/openbsd.md new file mode 100644 index 0000000..778bbc7 --- /dev/null +++ b/tags/openbsd.md @@ -0,0 +1,5 @@ +--- +layout: tagsort +tag: openbsd +permalink: /tags/openbsd/ +--- |
