diff --git a/config.toml b/config.toml index 1d3de90..b5a146b 100644 --- a/config.toml +++ b/config.toml @@ -18,6 +18,7 @@ taxonomies = [ ] generate_feed = true +feed_filename = "rss.xml" [markdown] # Whether to do syntax highlighting diff --git a/content/blog/2020-09-04-relm-on-windows.md b/content/blog/2020-09-04-relm-on-windows.md index 498b88c..a5d6eb4 100644 --- a/content/blog/2020-09-04-relm-on-windows.md +++ b/content/blog/2020-09-04-relm-on-windows.md @@ -21,20 +21,20 @@ around the unixy msys environment, the latter it is. Installing gtk3 is easy as it can be installed with *pacman* -``` example +``` sh $ pacman -S mingw64/mingw-w64-x86_64-gtk3 ``` Add some support for integrating with c libraries and linking, etc... -``` example +``` sh $ pacman -S mingw-w64-x86_64-toolchain base-devel ``` Being optimistic I installed glade. Probably wont need it today but it is a good test to see if Gtk apps at least start. -``` example +``` sh $ pacman -S mingw-w64-x86_64-glade ``` @@ -44,20 +44,20 @@ Glade starts and shows the GUI so the first milestone was reached. First install the cross compilation target -``` example +``` sh $ rustup target add x86_64-pc-windows-gnu ``` I can now compile with -``` example +``` sh $ PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu ``` To always enably this environment variable in the project folder I added a *.env* file with -``` example +``` sh PKG_CONFIG_ALLOW_CROSS=1 ``` @@ -65,7 +65,7 @@ which is picked up by the zsh dotenv plugin when I enter the folder. Similarly we can change the default target for cargo with adding -``` example +``` sh build] target = "x86_64-pc-windows-gnu" ``` @@ -74,13 +74,13 @@ to \*.cargo/config.toml We can now simply do -``` example +``` sh $ rust build ``` or -``` example +``` sh $ rust run ``` @@ -96,7 +96,7 @@ for the language server to pick it up. The solution I settled on was to launch *vscode* from the command line in the project folder: -``` example +``` sh $ code . ``` diff --git a/content/blog/2020-09-06-leveraging-env-vars-in-rust-apps.md b/content/blog/2020-09-06-leveraging-env-vars-in-rust-apps.md index b41c8c8..bd17799 100644 --- a/content/blog/2020-09-06-leveraging-env-vars-in-rust-apps.md +++ b/content/blog/2020-09-06-leveraging-env-vars-in-rust-apps.md @@ -22,7 +22,7 @@ folder, etc... The method we really are interested in is [var](https://doc.rust-lang.org/std/env/fn.var.html). -``` example +``` sh match env::var("MQTT_BROKER") { Ok(mqtt_broker) => mqtt_init(&mqtt_broker).await, Err(e) => error!("No broker specified in MQTT_BROKER environment variable.({})", e) @@ -57,7 +57,7 @@ fit all my requirements, so that\'s fine. All we need to do is initialize it after reading the environment variables from the *.env* file : -``` example +``` sh async fn main() { dotenv::dotenv().ok(); env_logger::init(); diff --git a/content/blog/2020-09-08-add-tap-escape-to-hhkb.md b/content/blog/2020-09-08-add-tap-escape-to-hhkb.md index ffb7f46..7fe1150 100644 --- a/content/blog/2020-09-08-add-tap-escape-to-hhkb.md +++ b/content/blog/2020-09-08-add-tap-escape-to-hhkb.md @@ -47,7 +47,7 @@ Waited a few days to confirm, and wrote it down before I forget. Here is the relevant part: -``` example +``` sh Control::Send {esc} Control & a::Send ^a Control & b::Send ^b diff --git a/content/blog/2020-09-08-install-latex-in-windows.md b/content/blog/2020-09-08-install-latex-in-windows.md index ba7515e..4d90b49 100644 --- a/content/blog/2020-09-08-install-latex-in-windows.md +++ b/content/blog/2020-09-08-install-latex-in-windows.md @@ -19,7 +19,7 @@ before. That is easy, in an admin shell run : -``` example +``` sh > choco install miktex ``` @@ -33,7 +33,7 @@ place for these In the msys terminal : -``` example +``` sh $ cd $ mkdir -p .local/texmf/tex/latex ``` @@ -47,7 +47,7 @@ missing. Also this is consistent with the Mac and Linux versions. Just add the repos for the *.sty* and *.cls* files to the folder we just made: -``` example +``` sh $ cd ~/.local/texmf/tex/latex $ git clone git@gitlab.xomeplace.com:latex/xomeplace-latex.git $ ... repeat for other templates ... diff --git a/content/blog/2020-10-15-setting-up-blogging-with-emacs.md b/content/blog/2020-10-15-setting-up-blogging-with-emacs.md index 09b5584..e08dc54 100644 --- a/content/blog/2020-10-15-setting-up-blogging-with-emacs.md +++ b/content/blog/2020-10-15-setting-up-blogging-with-emacs.md @@ -18,7 +18,7 @@ the repos the name was a quick choice. The structure is as follows: -``` text +``` -+- blog -+- posts -+- | +- org-template -+- | +- css -+- @@ -38,14 +38,14 @@ Prepare some snippets for the HTML pages First off, a link to the CSS: -``` elisp +``` lisp (setq website-html-head "") ``` Let\'s also add a navigation menu at the top of each page: -``` elisp +``` lisp (setq website-html-preamble "
    @@ -57,7 +57,7 @@ Let\'s also add a navigation menu at the top of each page: And a footer : -``` elisp +``` lisp (setq website-html-postamble "
    Copyright 2020 %a (%v HTML).
    Last updated %C.
    Built with %c.
    ") ``` @@ -65,7 +65,7 @@ And a footer : And now we can all tie it together by creating the **org-publish-project-alist**: -``` elisp +``` lisp (setq org-publish-project-alist `(("posts" @@ -145,7 +145,7 @@ serve: publish For local testing just do: -``` shell +``` sh $ make clean serve ``` @@ -218,7 +218,7 @@ The challenge was that the title is needed to create the slug for the filename and then again as title for the post. So my ugly solution is to stuff it in a variable and get the variable back in the template. -``` elisp +``` lisp (with-eval-after-load 'org-capture (defvar snamellit/blog-title "test-title") @@ -246,7 +246,7 @@ stuff it in a variable and get the variable back in the template. The **tpl-blog-post.org** template file : -``` org +``` #+title: %(progn snamellit/blog-title) #+date: %<%Y-%m-%d> diff --git a/content/blog/2020-10-26-access-nas-drive-using-windows10-pin-login.md b/content/blog/2020-10-26-access-nas-drive-using-windows10-pin-login.md index 125809b..e2a1a8e 100644 --- a/content/blog/2020-10-26-access-nas-drive-using-windows10-pin-login.md +++ b/content/blog/2020-10-26-access-nas-drive-using-windows10-pin-login.md @@ -51,14 +51,14 @@ It uses 2 scripts: A startup scrip to kickoff remapping after login -``` shell +``` sh PowerShell -Command "Set-ExecutionPolicy -Scope CurrentUser Unrestricted" >> "%TEMP%\StartupLog.txt" 2>&1 PowerShell -File "%SystemDrive%\Scripts\MapDrives.ps1" >> "%TEMP%\StartupLog.txt" 2>&1 ``` ## %SystemDrive%`\Scripts`{=latex}`\MapDrives`{=latex}.ps1 -``` shell +``` sh $i=3 while($True){ $error.clear() diff --git a/content/blog/2021-01-17-running-emacs-with-wsl2-xrdp.md b/content/blog/2021-01-17-running-emacs-with-wsl2-xrdp.md index 1957020..20fd19d 100644 --- a/content/blog/2021-01-17-running-emacs-with-wsl2-xrdp.md +++ b/content/blog/2021-01-17-running-emacs-with-wsl2-xrdp.md @@ -29,14 +29,14 @@ when I not use it because Global Warming. [Arch wiki page for xrdp](https://wiki.archlinux.org/index.php/xrdp) -``` shell +``` sh $ yay -S xrdp xorgxrdp-git ``` We do not have systemd in WSL2 so I started the daemons manually with a small script \*/usr/local/bin/start-xrdp: -``` shell +``` sh #!/bin/bash sudo /usr/sbin/xrdp sudo /usr/sbin/xrdp-sesman @@ -62,7 +62,7 @@ Note: Each time WSL2 restarts it gets a random ip address. So I created a small script to dig out the actual ip address out of the output of **ip address** : -``` shell +``` sh #!/bin/bash ip address show dev eth0 | grep "inet " | sed -e 's/.*inet \([^/]*\).*/\1/' ``` @@ -78,7 +78,7 @@ kind of GUI apps together. I do not know if it is directly used by Emacs or any of the extensions I use, however it reduces the amount of errors and warnings. -``` shell +``` sh $ yay -S dbus-x11 ``` @@ -93,7 +93,7 @@ we only need to start it as the only program in the XSession. This of course also means there is no chrome on the X-Window or the ability to lauch other programs outside of Emacs. This is exactly how I like it. -``` shell +``` sh #file:~/.xinitrc emacs -mm ``` @@ -110,13 +110,13 @@ I only intend to run emacs in the window however having something a bit more capable which works can help me debug the environment. (I have some font things to sort out too...) -``` shell +``` sh $ sudo pacman -S xfce4 ``` and then start it form **\~/.xinitrc** -``` shell +``` sh emacs & startxfce4 ``` diff --git a/content/blog/_index.md b/content/blog/_index.md index f20d116..7108af0 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,4 +1,9 @@ ---- -title: "Snamellit" ---- ++++ +title = "Snamellit" +description = "Blog Posts and other stuff I'll forget" +sort_by = "date" +paginate_by = 5 +paginate_reversed = false +generate_feed = true ++++ # Welcome to Snamellit diff --git a/content/blog/dape/Emacs Debugging with Dape.md b/content/blog/dape/index.md similarity index 100% rename from content/blog/dape/Emacs Debugging with Dape.md rename to content/blog/dape/index.md diff --git a/templates/categories/single.html b/templates/categories/single.html new file mode 100644 index 0000000..6496814 --- /dev/null +++ b/templates/categories/single.html @@ -0,0 +1,172 @@ +{% extends "layout.html" %} + +{% block rss %} + {% set rss_path = "categories/" ~ term.name ~ "/rss.xml" %} + +{% endblock rss %} + +{% block content %} +
    +

    + Category : {{ term.name }} +

    +
    + {% if paginator %} + {% set pages = paginator.pages %} + {% else %} + {% set pages = term.pages %} + {% endif %} + + {% for page in pages %} +
    +
    +

    {{ page.title }}

    +

    {{ page.description }}

    +
    + + +
    +
    +
    + + + + + + {{ page.reading_time }} min + + + + + + + {{ page.word_count }} words + +
    +
    + +
    + + + + + + + + + + + {% if page.extra.author.name %} + {{ page.extra.author.name }} + {% if page.extra.author.avatar %} + {{ page.extra.author.avatar_alt }} + {% endif %} + {% else %} + {{ config.extra.default_author.name }} + {{ config.extra.default_author.avatar_alt }} + {% endif %} + +
    +
    + + +
    + {{ page.summary | safe }} + + Read More + + + + +
    + + +
    +
    + {% if page.taxonomies.categories %} +

    + Categories: + {% for category in page.taxonomies.categories %} + + + + + {{category}} + + {% endfor %} +

    + {% endif %} +
    +
    + {% if page.taxonomies.tags %} +

    + Tags: + {% for tag in page.taxonomies.tags %} + + + + + {{tag}} + + {% endfor %} +

    + {% endif %} +
    +
    +
    + {% endfor %} +
    +
    +{% endblock content %} + +{% block pagination %} +{% if paginator.previous or paginator.next %} +
    +
    + {% if not paginator.previous %} + + + + + + Previous + + {% else %} + + + + + + Previous + + {% endif %} +
      + {% for pager in range(start=1, end=paginator.number_pagers+1) %} +
    • + + {{pager}} + +
    • + {% endfor %} +
    + {% if not paginator.next %} + + + Next Page + + + + + {% else %} + + + Next page + + + + + {% endif %} +
    +
    +{% endif %} +{% endblock %} diff --git a/templates/layout.html b/templates/layout.html new file mode 100644 index 0000000..463a705 --- /dev/null +++ b/templates/layout.html @@ -0,0 +1,325 @@ + + + + + + + + {% if config.extra.favicon.webmanifest %} + + {% endif %} + {% if config.extra.favicon.favicon_16x16 %} + + {% endif %} + {% if config.extra.favicon.favicon_32x32 %} + + {% endif %} + {% if config.extra.favicon.android_chrome_512 %} + + {% endif %} + {% if config.extra.favicon.android_chrome_192 %} + + {% endif %} + {% if config.extra.favicon.apple_touch_icon %} + + {% endif %} + {% if config.extra.favicon.apple_touch_icon %} + + {% endif %} + + + +{% block rss %} + +{% endblock %} + + {% block title %} + {{ config.title }} + {% endblock title %} + + + + + + + + + + +
    + {% block content %} + {% endblock content %} +
    + + + + + {% block pagination %} + {% endblock%} + + + + + + + + + {% if config.extra.enable_search %} + + + + {% endif %} + {% if config.extra.enable_multilingue %} + + {% endif %} + {% if config.extra.enable_adsense %} + + {% endif %} + {% block extra_js %} + {% endblock extra_js %} + + diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..aa73ac9 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,172 @@ +{% extends "layout.html" %} + +{% block rss %} + {% set rss_path = "tags/" ~ term.name ~ "/rss.xml" %} + +{% endblock rss %} + +{% block content %} +
    +

    + Tag : {{ term.name }} +

    +
    + {% if paginator %} + {% set pages = paginator.pages %} + {% else %} + {% set pages = term.pages %} + {% endif %} + + {% for page in pages %} +
    +
    +

    {{ page.title }}

    +

    {{ page.description }}

    +
    + + +
    +
    +
    + + + + + + {{ page.reading_time }} min + + + + + + + {{ page.word_count }} words + +
    +
    + +
    + + + + + + + + + + + {% if page.extra.author.name %} + {{ page.extra.author.name }} + {% if page.extra.author.avatar %} + {{ page.extra.author.avatar_alt }} + {% endif %} + {% else %} + {{ config.extra.default_author.name }} + {{ config.extra.default_author.avatar_alt }} + {% endif %} + +
    +
    + + +
    + {{ page.summary | safe }} + + Read More + + + + +
    + + +
    +
    + {% if page.taxonomies.categories %} +

    + Categories: + {% for category in page.taxonomies.categories %} + + + + + {{category}} + + {% endfor %} +

    + {% endif %} +
    +
    + {% if page.taxonomies.tags %} +

    + Tags: + {% for tag in page.taxonomies.tags %} + + + + + {{tag}} + + {% endfor %} +

    + {% endif %} +
    +
    +
    + {% endfor %} +
    +
    +{% endblock content %} + +{% block pagination %} +{% if paginator.previous or paginator.next %} +
    +
    + {% if not paginator.previous %} + + + + + + Previous + + {% else %} + + + + + + Previous + + {% endif %} +
      + {% for pager in range(start=1, end=paginator.number_pagers+1) %} +
    • + + {{pager}} + +
    • + {% endfor %} +
    + {% if not paginator.next %} + + + Next Page + + + + + {% else %} + + + Next page + + + + + {% endif %} +
    +
    +{% endif %} +{% endblock %}