-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.json
1 lines (1 loc) · 14.4 KB
/
index.json
1
[{"content":"So here we go again! Maybe this time it will be a success! 🚀\nBreath deeply and focus on one thing at a time.\n","permalink":"https://gloc-mike.github.io/2022-/07-/03/","summary":"So here we go again! Maybe this time it will be a success! 🚀\nBreath deeply and focus on one thing at a time.","title":"Starting Again"},{"content":"When using VS Code with jshint installed I would get the following error displayed whenever I opened a JavaScript project: I want jshint to be available globally \u0026hellip; I want it to be available in all JavaScript projects. So I went to the command line and dutifully entered npm install -g jshint thinking that it would fix the problem. It did not! ☹️\nA bit of searching on the net dredged up this very problem on StackOverflow. This answer was particularly helpful! Thanks Abdollah! 👍 🙂\nWhat I took from the SO issue was that the solution requires two steps:\nIssue npm install -g jshint (done ✅ 😄) and then, Configure the jshint node path in the VS Code preferences (not yet ❎ 🙁). So, what is the global node path on my device?\nTo find that out, one must use the npm root -g command. Use that command if you are using npm AND you specifically want to find the global root, otherwise use npm root to to find the local node path. 👍\nHere is a short asciinema asciicast of the process:\nAs I said, I want the location of the global node path and for me that is /usr/local/lib/node_modules. This location is the location relevant to a Homebrew install. If you installed node via nvm, then the location on macos is more likely to be something like ~/.nvm/versions/node/v12.18.3/lib/node_modules.\nFinally, open VS Code Settings, search for jshint node path in the Search settings field and then enter the global node path i.e. again, for me it\u0026rsquo;s /usr/local/lib/node_modules.\nAfter setting the jshint node path you can check it by opening the Command Palette and typing show output.\nThe output window should show something like this:\n1 [Info - 10:45:37 PM] jshint library loaded from /usr/local/lib/node_modules/jshint/src/jshint.js Et voilà! 😅\nUpdate 1:\nI originally installed node via Homebrew but this is apparently not best practice since a package manager (brew) is installing another package manager (npm) so I have uninstalled the brewed version of node and reinstalled the most recent version (v12.18.3 at time of publishing) via nvm.\nFind a description of the issue here.\nFind the GitHub nvm repo here.\nUpdate 2:\nThe \u0026ldquo;VS Code JSHint extension\u0026rdquo; setup documentation says that the extension will look in the jshint module in the current directory and in the global package location \u0026hellip; maybe it\u0026rsquo;s just me, but the extension does not seem to look in the global location and I had to update the jshint node path with the correct path.\nFind the JSHint extension repo here on GitHub.\n🦸 🎢\n","permalink":"https://gloc-mike.github.io/2020-/08-/22/","summary":"When using VS Code with jshint installed I would get the following error displayed whenever I opened a JavaScript project: I want jshint to be available globally \u0026hellip; I want it to be available in all JavaScript projects. So I went to the command line and dutifully entered npm install -g jshint thinking that it would fix the problem. It did not! ☹️\nA bit of searching on the net dredged up this very problem on StackOverflow.","title":"Solution to 'Failed to load jshint library' Error in VS Code"},{"content":"TL;DR\nAdd /* after the opening shortcode tags i.e., {{\u0026lt; and */ before the closing shortcode tags i.e. \u0026gt;}}\nWhile creating the post Beautifulhugo Theme Extras - Shortcodes (Split), I had quite a bit of trouble finding the answer to the question of \u0026ldquo;how can I display a block code in my post?\u0026rdquo;.\nThe answer seemed obvious, use a code fence i.e. use triple backticks; OR indent the code block using 4 spaces; OR after adding a colon (:), surround the code by two blank lines, one at the top and one below the last line of code.\nAs it turned out, that was the wrong question! I, Robot anyone?\nThe right question was \u0026ldquo;what is the markdown escape sequence required to correctly display a hugo shortcode in my post i.e. without it being interpreted?\u0026rdquo;.\nThe answer eventually came to me via Desmond Lua at LuaSoftware.\nThanks Desmond! 😅\n","permalink":"https://gloc-mike.github.io/2020-/08-/14/","summary":"TL;DR\nAdd /* after the opening shortcode tags i.e., {{\u0026lt; and */ before the closing shortcode tags i.e. \u0026gt;}}\nWhile creating the post Beautifulhugo Theme Extras - Shortcodes (Split), I had quite a bit of trouble finding the answer to the question of \u0026ldquo;how can I display a block code in my post?\u0026rdquo;.\nThe answer seemed obvious, use a code fence i.e. use triple backticks; OR indent the code block using 4 spaces; OR after adding a colon (:), surround the code by two blank lines, one at the top and one below the last line of code.","title":"Escaping Hugo Shortcodes in Posts"},{"content":"Another extra beautifulhugo theme shortcode is called split. This shortcode splits the page into two columns. The example shown in the doco in the beautifulhugo repo (at the time of writing) was a little confusing because the closing endcolumns tag was incorrect (missing an s). Got there in the end. 😅\nIt should look like this:\n1 2 3 4 5 {{\u0026lt; columns \u0026gt;}} First column on the right side of the page {{\u0026lt; column \u0026gt;}} Second column on the left side of the page {{\u0026lt; endcolumns \u0026gt;}} Yes, the first tag is columns whereas the intermediate tag is column. And the closing tag is again a plural i.e. endcolumns.\nBelow is an example of the split shortcode in action:\nColumn 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Eget mauris pharetra et ultrices. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis. Sed egestas egestas fringilla phasellus faucibus scelerisque eleifend donec. In vitae turpis massa sed elementum tempus. Sed risus ultricies tristique nulla aliquet enim tortor at. Lectus vestibulum mattis ullamcorper velit sed ullamcorper morbi. Donec pretium vulputate sapien nec sagittis aliquam malesuada bibendum. Adipiscing bibendum est ultricies integer quis auctor elit sed vulputate. Cras tincidunt lobortis feugiat vivamus at augue eget arcu.\nColumn 2 Consequat mauris nunc congue nisi vitae. Sit amet consectetur adipiscing elit pellentesque habitant morbi tristique senectus. At auctor urna nunc id cursus. Id velit ut tortor pretium viverra suspendisse potenti. Consequat mauris nunc congue nisi vitae suscipit tellus mauris. Commodo ullamcorper a lacus vestibulum sed arcu non odio euismod. Curabitur gravida arcu ac tortor dignissim convallis aenean et. Dapibus ultrices in iaculis nunc sed. Posuere lorem ipsum dolor sit amet consectetur adipiscing elit duis. Nisl pretium fusce id velit ut. Elit pellentesque habitant morbi tristique senectus. Nulla porttitor massa id neque aliquam vestibulum morbi. Vitae auctor eu augue ut lectus arcu bibendum at varius. Euismod in pellentesque massa placerat duis ultricies. Sagittis orci a scelerisque purus semper. Scelerisque purus semper eget duis at tellus at urna.\nI\u0026rsquo;m pretty sure I will be able to use this one somewhere! 🤔\nUpdate:\nTo get this to work in PaperMod, I needed to copy over some CSS (used by the shortcode) from the beautifulhugo theme. I added that CSS (below) to a new file I created called columns.css, which was saved in project_root\\assets\\extended\\css\\.\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 /* IPython split style */ div.splitbox {width:100%; overflow:auto;} div.splitbox div.left { width:48%; float:left;} div.splitbox div.right { width:48%; float:right;} @media only screen and (max-width: 600px) { div.splitbox div.left { width:100%; float:left;} div.splitbox div.right { width:100%; float:left;} } ","permalink":"https://gloc-mike.github.io/2020-/08-/13/","summary":"Another extra beautifulhugo theme shortcode is called split. This shortcode splits the page into two columns. The example shown in the doco in the beautifulhugo repo (at the time of writing) was a little confusing because the closing endcolumns tag was incorrect (missing an s). Got there in the end. 😅\nIt should look like this:\n1 2 3 4 5 {{\u0026lt; columns \u0026gt;}} First column on the right side of the page {{\u0026lt; column \u0026gt;}} Second column on the left side of the page {{\u0026lt; endcolumns \u0026gt;}} Yes, the first tag is columns whereas the intermediate tag is column.","title":"Beautifulhugo Theme Extras - Shortcodes (Split)"},{"content":"An extra beautifulhugo theme shortcode is called details (checking the code itself shows that it is based on the HTML \u0026lt;details\u0026gt; tag). This shortcode hides some content until the text set on the detail is clicked.\nAn example follows:\nClick here to expand to show hidden content! This is the content you\u0026rsquo;d like to hide. 🧘\nThe actual code used in this post for the previous example looks like this:\n1 2 3 {{\u0026lt; details \u0026#34;Click here to expand to show the content!\u0026#34; \u0026gt;}} This is the content you\u0026#39;d like to hide. 🧘 {{\u0026lt; /details \u0026gt;}} I had trouble adding spacing to the content in the details shortcode above so I resorted to adding HTML \u0026lt;br\u0026gt; tags but that didn\u0026rsquo;t work either. Probably need to escape some HTML or something like that - not looking into that now though - maybe for another time.\nCuriously also, I found that it is impossible (for me) to add extra whitespace after the details shortcode. I\u0026rsquo;ve tried adding 1 or more blank lines inside of \u0026lt;pre\u0026gt;\u0026lt;/pre\u0026gt; tags and I tried adding numerous \u0026lt;br\u0026gt; tags after the details shortcode but neither of these approaches worked. In fact when I add a \u0026lt;br\u0026gt; tag after the shortcode the line after is not displayed \u0026hellip; not sure what is going on.\nThe learning continues! 🏃\n","permalink":"https://gloc-mike.github.io/2020-/08-/12/","summary":"An extra beautifulhugo theme shortcode is called details (checking the code itself shows that it is based on the HTML \u0026lt;details\u0026gt; tag). This shortcode hides some content until the text set on the detail is clicked.\nAn example follows:\nClick here to expand to show hidden content! This is the content you\u0026rsquo;d like to hide. 🧘\nThe actual code used in this post for the previous example looks like this:","title":"Beautifulhugo Theme Extras - Shortcodes (Details)"},{"content":"The beautifulhugo theme has support for Hugo\u0026rsquo;s Chroma (a general purpose syntax highlighter in pure Go) syntax highlighting.\nLet me try that out! 🚀\nAdd the following to the site config i.e.config.toml file:\n1 2 pygmentsCodeFences = true pygmentsUseClasses = true Then from the command line, generate the desired new code style (in my case, monokai) by running:\n1 hugo gen chromastyles --style=monokai \u0026gt; static/monkai.css Or if you want to add more structure to your static files, add the following to the site config i.e. config.toml file:\n1 staticDir = [\u0026#34;static\u0026#34;, \u0026#34;static/css\u0026#34;] And then re-generate the code style using the new folder path i.e. static/css :\n1 hugo gen chromastyles --style=monokai \u0026gt; static/css/monkai.css ","permalink":"https://gloc-mike.github.io/2020-/08-/11/","summary":"The beautifulhugo theme has support for Hugo\u0026rsquo;s Chroma (a general purpose syntax highlighter in pure Go) syntax highlighting.\nLet me try that out! 🚀\nAdd the following to the site config i.e.config.toml file:\n1 2 pygmentsCodeFences = true pygmentsUseClasses = true Then from the command line, generate the desired new code style (in my case, monokai) by running:\n1 hugo gen chromastyles --style=monokai \u0026gt; static/monkai.css Or if you want to add more structure to your static files, add the following to the site config i.","title":"Beautifulhugo Theme Extras - Chroma Server Side Syntax Highlighting"},{"content":"It\u0026rsquo;s ALIVE!\nTime for a celebratory virtual tipple! 🍸\nCheers! 😄 🎉 😄\n","permalink":"https://gloc-mike.github.io/2020-/08-/10/","summary":"It\u0026rsquo;s ALIVE!\nTime for a celebratory virtual tipple! 🍸\nCheers! 😄 🎉 😄","title":"It's Alive!"},{"content":"Some stuff about me!? It might be interesting \u0026hellip;🤔\nWhy? A(nother) blog on coding (python, etc.), technical notes, family, travel, life, etcetera, etcetera,\u0026hellip; it\u0026rsquo;s been a long time coming! 😬\nFlip-flopped from nothing to Pelican, then to Hugo, to Sphinx and then back to Hugo once again. 🥴\nThe current version of Hugo is very pleasing to work with (happy, happy, joy, joy).\nwhoami Michael Ball 🇦🇺 (gloc[.-_]mike, astroboy, ballzy, gobb, amongst others (too many and ugly to mention here 🤣).\nVERY lucky husband to \u0026rsquo;the one\u0026rsquo; 🇿🇦 and proud father of two 👧 👧 and pet-father to two adorable Tonkinese 🐈 🐈.\nFortunate to be a SAS Programmer in the Pharmaceutical Industry by day and aspiring Pythonista (among other things) by most-of-the-rest-of-my-disposable-time.\nHave lived in Malaysia 🇲🇾, Scotland 🏴 and Switzerland 🇨🇭 but currently, I\u0026rsquo;m a resident of Sydney, Australia. 🇦🇺\nLapsed [traveller, photographer, skier, suba-diver] and a life-long foreign language learner lover.\nFan of Archer, One Punch Man and many other animated series/movies \u0026hellip; now what does that say about me? 🤔 Oh and Sci-fi fan \u0026hellip;have toi\n\u0026lsquo;gloc.mike\u0026rsquo;? Gravity Induced Lose of Consciousness (GLOC) (not the gun: GLOCK) 😳 Gaming handles (that I like) are hard to come by easily. GLoC struck a cord with me and \u0026lsquo;gloc.mike\u0026rsquo; was \u0026hellip; not taken. 😝\n","permalink":"https://gloc-mike.github.io/about/","summary":"Some stuff about me!? It might be interesting \u0026hellip;🤔\nWhy? A(nother) blog on coding (python, etc.), technical notes, family, travel, life, etcetera, etcetera,\u0026hellip; it\u0026rsquo;s been a long time coming! 😬\nFlip-flopped from nothing to Pelican, then to Hugo, to Sphinx and then back to Hugo once again. 🥴\nThe current version of Hugo is very pleasing to work with (happy, happy, joy, joy).\nwhoami Michael Ball 🇦🇺 (gloc[.-_]mike, astroboy, ballzy, gobb, amongst others (too many and ugly to mention here 🤣).","title":""}]