1
Fork 0

Fix markdown rendering with markdown mode

Turns out this had been broken since Hugo 0.55, and I never worked out why...

https://gohugo.io/content-management/shortcodes/#shortcodes-with-markdown
This commit is contained in:
Jake Howard 2019-12-22 22:32:59 +00:00
parent 58d300f991
commit 9705daade3
Signed by: jake
GPG key ID: 57AFB45680EDD477
14 changed files with 41 additions and 42 deletions

View file

@ -7,9 +7,9 @@ hide_header_image: true
Bluetooth audio is great! I've had a pair of Bluetooth headphones, [Sony MDR-XB950 BT](https://www.sony.com/electronics/headband-headphones/mdr-xb950bt), for around a year now, and the ability to listen to music without cables is amazing. But, I can only use the Bluetooth parts of this with my phone, because on Linux, it just sounds terrible. I've even gone so far as to buy and wire in a cable on my desk at work to enable me to fairly easily connect to my desk, without having to plug into the desktop every day.
{{% resource src="device-broken.png" %}}
{{< resource src="device-broken.png" >}}
`A2DP` marked as _unavailable_.
{{% /resource %}}
{{< /resource >}}
## The Problem
The issue is caused by a lack of `A2DP`, a Bluetooth profile for transmitting stereo audio at high quality. According to the manual for my headphones, it supports `A2DP` just fine, however, my computer was reporting it didn't, and so was saying it was _unavailable_.
@ -25,9 +25,9 @@ If there's 1 thing I know, it's that there's an [AUR](https://aur.archlinux.org/
That's it!
{{% resource src="device-fixed.png" %}}
{{< resource src="device-fixed.png" >}}
`A2DP` is now enabled! _(Ignore the fact the device name changed)_
{{% /resource %}}
{{< /resource >}}
## The Cause
According to the [related wiki](https://wiki.archlinux.org/index.php/Talk:Bluetooth_headset#GDMs_pulseaudio_instance_captures_bluetooth_headset), it's caused by `GDM` capturing the Bluetooth device, and unloading certain modules if they exist. I'm not exactly sure why it does this, but it's a fairly well documented issue.

View file

@ -25,9 +25,9 @@ These new features require some changes to the system, your database file, and b
To migrate to KDBX4, you must change the _Encryption Algorithm_ to _"ChaCha20"_, and the _Key Derivation Function_ to _"Argon2"_. These can both be done in the _Encryption_ settings for your database (Database > Database Settings).
{{% resource src="db-settings.png" %}}
{{< resource src="db-settings.png" >}}
The settings I'm using for my database
{{% /resource %}}
{{< /resource >}}
### Mobile
If you're planning to use your database on less-powerful hardware, such as a phone, you'll want to set the transformation rounds low. Argon2 is far more computationally intensive compared to PBKDF2. Using the 1-second benchmark button suggests using just 23 rounds. Where before I used 20,000 rounds of PBKDF2, I now use just 5 rounds of Argon2, to ensure it opens in reasonable time on my phone.
@ -74,16 +74,16 @@ With the SSH now enabled, a new _"SSH Agent"_ tab appears in the entry edit view
To pair the key with this entry, you should attach it from the _"Advanced"_ pane. You only need to attach the private key, as this often contains the related public key as part of the file. Then, from the _"SSH Agent"_ pane, select the attachment as the primary key. This should populate the _"Public key"_ section with the respective public key.
{{% resource src="ssh-agent-settings.png" %}}
{{< resource src="ssh-agent-settings.png" >}}
The _"SSH Agent"_ pane showing an attached key
{{% /resource %}}
{{< /resource >}}
I've also set the key to be automatically added and removed from the agent, rather than manually. It'd be nice if this could be changed / defaulted globally.
Now, the keys are accessibly to use for authentication.
{{% resource src="ssh-agent-terminal.png" %}}
{{< resource src="ssh-agent-terminal.png" >}}
You can validate they're accessible using `ssh-add -l`, which should show the fingerprint of the key.
{{% /resource %}}
{{< /resource >}}
These new features of KeePassXC are completely optional. However, KeePassHTTP and legacy key files are considered deprecated, and may be removed in upcoming releases. So, might as well update now!

View file

@ -7,9 +7,9 @@ hide_header_image: true
As anyone who's used an application written with the QT UI framework will know, they don't always look the best, and certainly don't fit in with the rest of your desktops theme in the way GTK does. Certain themes support styling both GTK and QT applications, however most don't.
{{% resource src="qt-gtk-before.png" %}}
{{< resource src="qt-gtk-before.png" >}}
KeePassXC, before it looked pretty
{{% /resource %}}
{{< /resource >}}
Fortunately, there's a solution, and it comes in the form of a _Theme engine_. Theme engines act as a small compatibility layer, allowing certain frameworks to render as if they were others. With this, we can tell QT applications to render as if they were GTK.
@ -24,6 +24,6 @@ Installing the environment variable can't be done in your `.bashrc`, as variable
After install, simply reboot, and your apps should fit in far, _far_ better with the rest of your desktop.
{{% resource src="qt-gtk-after.png" %}}
{{< resource src="qt-gtk-after.png" >}}
KeePassXC, with GTK looks much nicer!
{{% /resource %}}
{{< /resource >}}

View file

@ -13,9 +13,9 @@ My current distro of choice is [Arch](https://www.archlinux.org/), specifically
## Desktop
My current desktop of choice is [i3](https://i3wm.org/). After spending a lot of time using [Gnome](https://www.gnome.org/), and always having windows either full screen or split, I tried out i3 in an attempt to use fewer resources, and it's amazing. Admittedly i3 doesn't look quite as nice, but it's far cleaner, and structured, and that's enough for me!
{{% resource src="editing-my-stack.png" %}}
{{< resource src="editing-my-stack.png" >}}
Editing my stack, in caret
{{% /resource %}}
{{< /resource >}}
# Editors
## Code
@ -30,9 +30,9 @@ If I'm just editing a file quickly, whether it be config from the terminal, or a
# Shell
Whilst I use [ZSH](https://www.zsh.org/), I'm not a fan of the [super fancy themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) for it, which display your current git branch, node version, time, all that jazz. My terminal is a take on the default colourised Debian terminal, with a lambda symbol who's colour changes depending on the return code of the previous command.
{{% resource src="shell-prompt.png" %}}
{{< resource src="shell-prompt.png" >}}
My shell prompt
{{% /resource %}}
{{< /resource >}}
I do have a fair number of plugins and aliases, thanks to both [oh my ZSH](http://ohmyz.sh/) and [my custom config](https://github.com/RealOrangeOne/dotfiles/tree/master/modules/shell/files).

View file

@ -33,9 +33,9 @@ Last year, I was a fan of [Caret](https://caret.io/), and was eagerly awaiting v
## Quick files edits
Nothing beats [Vim](http://www.vim.org/) for anything like this. I've switched my default editor for git commit messages, and have it installed on all my servers. I'm still unfamiliar with many of the advanced keyboard shortcuts, but I can navigate around a file just well enough for me.
{{% resource src="editing-my-stack.png" %}}
{{< resource src="editing-my-stack.png" >}}
Editing my stack, in VSCode
{{% /resource %}}
{{< /resource >}}
# Shell
My shell prompt is almost identical to last year. If it ain't broke, don't fix it! I've got plenty of aliases setup to make complex tasks easier, and the prompt looking just how I like it!
@ -43,9 +43,9 @@ My shell prompt is almost identical to last year. If it ain't broke, don't fix i
# Terminal Emulator
My terminal environment has probably been one of the largest changes in the last 12 months. Previously, I was using [Terminator](https://gnometerminator.blogspot.co.uk/p/introduction.html). In the last year, I've moved from Terminator, to [Tilix](https://gnunn1.github.io/tilix-web/), and finally settled on [Alacritty](https://github.com/jwilm/alacritty), with [Tmux](https://github.com/tmux/tmux). Alacritty is fast, lightweight, and GPU-accelerated. Thanks to Tmux, I can keep the tiled experience in my terminal too. After a colleague started experimenting with Tmux, I gave it a shot, and it's great. My config is modified, like changing the prefix to `C-t`, and to make sure things still work as I'm used to.
{{% resource src="terminal.png" %}}
{{< resource src="terminal.png" >}}
My shell prompt
{{% /resource %}}
{{< /resource >}}
# Browser
[Firefox](https://www.mozilla.org/en-GB/firefox/new/), end of.

View file

@ -20,4 +20,4 @@ React Native is a tricky platform to get started on, but once you understand the
The Presentation
{{< /iframe >}}
{{% repobutton %}}
{{< repobutton >}}

View file

@ -43,9 +43,9 @@ When it comes to creating the database for WordPress, it's really very simple. J
In simple terms, Wordfence is a firewall for WordPress. It monitors the requests to your application, and blocks suspicious activity, and attempts to block brute-force attempts. The nicest feature I found was the check for commonly exposed configuration files, and prompting to remove them.
{{% resource src="wordfence.png" %}}
{{< resource src="wordfence.png" >}}
Categories Wordfence protects
{{% /resource %}}
{{< /resource >}}
## Validate your work

View file

@ -78,9 +78,9 @@ OpenVPN Access Server is free for 2 concurrent users. For this, we only need, so
Once the script has finished, you'll need to set the password for the builtin user. Run `sudo passwd openvpn` to do this. Open the _"Admin UI"_ URL displayed after the init script. It's probably `https://<ip>:943/admin`. Here, you can login as the `openvpn` user.
{{% resource src="landing-screen.png" %}}
{{< resource src="landing-screen.png" >}}
Landing page for OpenVPN admin panel
{{% /resource %}}
{{< /resource >}}
### Create the client account
@ -90,9 +90,9 @@ Once logged in, click _"User Permissions"_ in the sidebar, and create a new user
The new VPN user needs to be told to allow traffic to flow to other devices on its network. To do this, we need to enable a feature called _"VPN Gateway"_. Under the user settings, switch the related radio button to _Yes_, and enter the subnets you want to be accessible. These should be 1 per line, and in the format `192.168.1.0/24`. You will also need to enable access from _"all server side private subnets"_ and _"all other VPN clients"_.
{{% resource src="user-settings.png" %}}
{{< resource src="user-settings.png" >}}
Make sure your user settings look roughly like this.
{{% /resource %}}
{{< /resource >}}
### Set up the client device

View file

@ -7,7 +7,7 @@ Astrill, my VPN of choice, allows you to export OpenVPN config files for all it'
The export step is really simple, you just login to the web portal, create an entry for your machine, and export the config files. Their tutorial for this can be found [here](http://wiki.astrill.com/index.php/Astrill_Setup_Manual:How_to_configure_OpenVPN_with_Network_Manager_on_Linux). The only problem is that some applications won't accept the certificates embedded into the file like astrill provide. (Gnome does, but I only realised that whilst writing this).
{{% gist %}}
{{< gist >}}
The above script will split out the files and save them into separate directories for each config file. These files can then be imported and used in an OpenVPN-compatable application.

View file

@ -15,5 +15,4 @@ The server is written in [Rust](https://rust-lang.org/), using [rocket](https://
The server is already deployable in heroku-like environments, with [the rust buildpack](https://github.com/emk/heroku-buildpack-rust). It should also be very simple to build a docker container or custom deployment workflow around it.
{{% repobutton %}}
{{< repobutton >}}

View file

@ -12,4 +12,4 @@ In order to make it accessible for as many people in as many different languages
The source of the library is on GitHub as a gist. I recommend downloading the file to use yourself, however for testing you can use GitHub's raw file as a hotlink.
{{% gist %}}
{{< gist >}}

View file

@ -28,7 +28,7 @@ With this, I started to write something that would change the location of the if
### Source
The source for this was written in pure JS, and relies heavily on the fact that the wiki game uses jQuery so I can plug into components and events really easily. The code can be found in the GitHub gist below. Both the standard and compact versions are available.
{{% gist %}}
{{< gist >}}
### Disclaimer
As I experienced whilst developing this, the people that play Wiki Game don't tend to like people cheating. There were a lot of people getting very annoyed whilst I was developing and testing. So please use this at your own risk! At the moment I don't think there is any kind of banning system, but be warned!

View file

@ -28,4 +28,4 @@ $ yoga disable touch
Problem solved!
Whilst I've only tested this on my laptop, there's no reason it shouldn't work on others too! If it doesn't, submit an [issue](https://github.com/{{% param "repo" %}}/issues/)!
Whilst I've only tested this on my laptop, there's no reason it shouldn't work on others too! If it doesn't, submit an [issue](https://github.com/{{< param "repo" >}}/issues/)!

View file

@ -12,7 +12,7 @@
<figure class="text-center">
{{ template "img" . }}
<figcaption class="text-center">
<small>{{ .Inner }}</small>
<small>{{ .Inner | markdownify }}</small>
</figcaption>
</figure>
{{ else }}