tags: [[webdev]]
_site/
better, so that vscode markdown wikilink add foam plugin thing doesn’t try to use those markdown files to link toa kind-of implementation of backlinks is in _layout/page.html
. It looks for wikilinks (links like [[this]]
) in markdown or html.
This implementation is very hacky. I don’t think there’s a good way of actually doing this with the standard github-pages jekyll config, I think it’s worth setting up a CI-server and using a plugin or something to make backlinks automatically (such as maybe this one: https://github.com/raghuveerdotnet/simply-jekyll )
Another problem with doing it this way is that every page must search through the content of every other page to look for links. (so that’s $O(n^2)$ on the number of pages, right?) This would probably be a big problem if I had a significant number of pages. So, good luck with that, future-joules.
I can do this with a liquid template:
{% for page in site.pages %}
{%- if page.published != false and page.title != nil -%}
* [[{{ page.title }}]({{ page.url }})]
{% endif -%}
{% endfor %}
enable autolink
extension in _config.yml
(ref https://github.com/github/jekyll-commonmark-ghpages)
Gemfile
:source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
bundle install
bundle exec jekyll serve --livereload
justfile
localhost:
bundle exec jekyll serve --livereload