~bkhl/elektrubadur.se

b34913eac0e4356a253ff2b1892454241a3d1b3c — Björn Lindström 1 year, 3 months ago e6572ef
Fixed some links after running link checker
M Justfile => Justfile +3 -0
@@ 80,3 80,6 @@ package_redirect:

publish_redirect domain: package_redirect
    hut pages publish --domain '{{ domain }}' --site-config ./site-config-redirect.json redirect.tar.gz

check_links:
    podman run --rm docker.io/tennox/linkcheck --external '{{ DOMAIN }}'

M content/first_month_with_fedora_silverblue.org => content/first_month_with_fedora_silverblue.org +1 -1
@@ 15,7 15,7 @@ containers.
Previously I was using Ubuntu with a lot of Ansible playbooks for
installing things both globally and in my home directory. I used to keep
those playbooks in the same directory as my
[[https://gitlab.com/bkhl/dotfiles/][dotfiles]], but after the switch to
[[https://git.sr.ht/~bkhl/dotfiles][dotfiles]], but after the switch to
Fedora I removed them. If anyone is curious about what that looked like,
[[https://gitlab.com/bkhl/workstation-playbooks/tree/065ce9ca0547ca4d9c1e574407ba6373fcc99b69][they
are here]].

M content/how_this_blog_works.org => content/how_this_blog_works.org +1 -1
@@ 5,7 5,7 @@

This blog is created using the [[https://www.getzola.org/][Zola static site engine]]. I use a combination of [[https://docs.gitlab.com/ee/ci/][GitLab CI]] and =cron= to automatically upload it to my web server whenever I merge a change to the [[https://git-scm.com/][Git]] =master= branch of the home page.

The =elektrubadur.se= source code is kept [[https://gitlab.com/bkhl/elektrubadur.se/][here in GitLab]]. While writing a post I just run =zola serve= on my computer and can look at a dynamically updated website on a local web server.
The =elektrubadur.se= source code is kept /here in GitLab/ /[Update 2023-06-07: [[https://git.sr.ht/~bkhl/elektrubadur.se/tree/d57ce94deec71c605ca62d4427befa8c59998d6f][elektrubadur.se sourcecode moved to Sourcehut]]]/. While writing a post I just run =zola serve= on my computer and can look at a dynamically updated website on a local web server.

# more


M content/vimwiki_and_nextcloud.org => content/vimwiki_and_nextcloud.org +7 -29
@@ 3,28 3,15 @@
#+CATEGORIES[]: Programming
#+TAGS[]: Vim Vimwiki Nextcloud notes

I've been using [[http://vimwiki.github.io/][Vimwiki]] for a while,
which lets me keep interlinked plain text notes on my computer with
minimal hassle.
I've been using [[http://vimwiki.github.io/][Vimwiki]] for a while, which lets me keep interlinked plain text notes on my computer with minimal hassle.

For a while I've also kept these synced to my phone via the
[[https://apps.nextcloud.com/apps/notes/][Nextcloud Notes]] application.
I have a self-hosted [[https://nextcloud.com/][Nextcloud]] instance, and
simply point Vimwiki on my computer to the same directory in the
directory that I have synchronized with Nextcloud.
For a while I've also kept these synced to my phone via the [[https://apps.nextcloud.com/apps/notes/][Nextcloud Notes]] application. I have a self-hosted [[https://nextcloud.com/][Nextcloud]] instance, and simply point Vimwiki on my computer to the same directory in the directory that I have synchronized with Nextcloud.

The Nextcloud Notes app uses Markdown, so I have to configure Vimwiki to
use that syntax, which is fine with me. One quirk of the Nextcloud Notes
app is that rather than letting you name files independently, it will
change filenames to whatever the first line of your note is. Until today
that meant I had to keep making sure in Vimwiki to add those headers,
but I've now finally automated that.
The Nextcloud Notes app uses Markdown, so I have to configure Vimwiki to use that syntax, which is fine with me. One quirk of the Nextcloud Notes app is that rather than letting you name files independently, it will change filenames to whatever the first line of your note is. Until today that meant I had to keep making sure in Vimwiki to add those headers, but I've now finally automated that.

# more

To start with, I added the function =SetWikiHeader= to
[[https://gitlab.com/bkhl/dotfiles/-/blob/0ab54ef439d570e09aae61fe18c8c0538fa90a0d/.vim/plugin/config/vimwiki.vim][my
=~/.vim/plugin/config/vim.wiki=]]:
To start with, I added the function =SetWikiHeader= to [[https://git.sr.ht/~bkhl/dotfiles/tree/f43814891fcd47bf5a724d303be670c5f6308ecd/item/.vim/plugin/config/vimwiki.vim][my ~/.vim/plugin/config/vim.wiki]]:

#+begin_src vim
if &runtimepath !~? "vimwiki"


@@ 66,15 53,9 @@ function SetWikiHeader()
endfunction
#+end_src

Vim script is pretty weird, had to search in documentation for how to do
most things in there. Props to people who write entire programs in it,
like let's say [[https://github.com/orgs/vimwiki/people][those people
that wrote Vimwiki]].
Vim script is pretty weird, had to search in documentation for how to do most things in there. Props to people who write entire programs in it, like let's say [[https://github.com/orgs/vimwiki/people][those people that wrote Vimwiki]].

Now, to make this run whenever I open a Vimwiki file, or before saving
it, I put this in
[[https://gitlab.com/bkhl/dotfiles/-/blob/0ab54ef439d570e09aae61fe18c8c0538fa90a0d/.vim/ftplugin/vimwiki.vim][my
=~/.vim/ftplugin/vimwiki.vim=]]:
Now, to make this run whenever I open a Vimwiki file, or before saving it, I put this in [[https://git.sr.ht/~bkhl/dotfiles/tree/f43814891fcd47bf5a724d303be670c5f6308ecd/item/.vim/ftplugin/vimwiki.vim][my ~/.vim/ftplugin/vimwiki.vim]]:

#+begin_src vim
" Set header to match filename when opening or saving file, for


@@ 83,7 64,4 @@ call SetWikiHeader()
autocmd BufWritePre <buffer> call SetWikiHeader()
#+end_src

The end result is pretty nice. The only big catch is that I can't rename
files in Nextcloud Notes if they have a lot of links to them, since
those links only get updated if I use the rename function in Vimwiki,
but then that's not something I do very often.
The end result is pretty nice. The only big catch is that I can't rename files in Nextcloud Notes if they have a lot of links to them, since those links only get updated if I use the rename function in Vimwiki, but then that's not something I do very often.