diff --git a/pages/02.linux/21.grav/default.en.md b/pages/02.linux/21.grav/default.en.md index efc568b..f2272c4 100644 --- a/pages/02.linux/21.grav/default.en.md +++ b/pages/02.linux/21.grav/default.en.md @@ -15,6 +15,38 @@ Make sure the directory you want to use is owned by your webserver user. (www-da **With included admin client** `sudo -u www-data wget https://getgrav.org/download/core/grav-admin/1.7.32` +### My customisations +#### Fix for wonky sidebar +With the default configuration, using jquery-scrollbar, there are issues with extremely long subtopics making the bar not scroll all the way to the bottom. +My workaround is adding the following CSS to custom.css in the theme's `css` directory. +```css +.highlightable { + overflow: auto; +} +``` +#### Code copy don't copy # or $ +This needs to be modified in `js/learn.js` +Here's the change as well as the surrounding code. +```js + // clipboard + var clipInit = false; + $('code').each(function() { + var code = $(this), + text = code.text(); + + if (text.length > 5) { + if (!clipInit) { + var text, clip = new Clipboard('.copy-to-clipboard', { + text: function(trigger) { + text = $(trigger).prev('code').text(); + // NOTE custom stuff to strip # or $ from the beginning of my inline command blocks + return text.replace(/^[\$\s\#\$]{1,4}/gm, ''); + // original code + return text.replace(/^\$\s/gm, ''); + } + }); +``` + ## Nginx config ``` server {