<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>GitHub on Much Ado About IT</title><link>https://it.knightnet.org.uk/tags/github/</link><description>
Recent content about GitHub from Much Ado About IT |
Ramblings and rantings from IT Architect &amp; Designer, Julian Knight</description><generator>Hugo | gohugo.io | Theme twenty-sixteen</generator><language>en-gb</language><copyright>This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</copyright><lastBuildDate>Mon, 24 Apr 2023 21:27:28 +0000</lastBuildDate><atom:link href="https://it.knightnet.org.uk/tags/github/feed.xml" rel="self" type="application/rss+xml"/><item><title>Creating GitHub Releases from git Tags</title><link>https://it.knightnet.org.uk/blog/creating-github-releases-from-git-tags/</link><guid isPermaLink="true">https://it.knightnet.org.uk/blog/creating-github-releases-from-git-tags/</guid><pubDate>Sun, 30 Dec 2018 21:23:20 +0000</pubDate><guid>https://it.knightnet.org.uk/blog/creating-github-releases-from-git-tags/</guid><description><div>The workflow for updating version numbers and doing git/GitHub/npm releases is far too complex to easily remember when you aren't doing it very often. This post is a reminder of the various steps.</div><div>&lt;p>Just a quick reminder for myself mainly.&lt;/p>
&lt;p>GitHub will automatically create a release from a git tag. Having had a request for this from an issue with node-red-contrib-uibuilder, I
decided that I&amp;rsquo;d better look into how to do it.&lt;/p>
&lt;p>Why is everything harder than it should be!? Anyway, here is the raw workflow for committing changes to a git managed repository of code,
creating a tag, pushing both master and the tag to GitHub and then publishing to npm.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># This could be minor or major instead of patch, it updates package.js&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">npm npm version patch -m &lt;span class="s2">&amp;#34;Patch version bump to %s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># We might want to stage instead of committing everything at once&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git commit -m &lt;span class="s2">&amp;#34;Commit message&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git push
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Create a tag to match the npm version&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git tag -a v1.4.1 -m &lt;span class="s2">&amp;#34;my version 1.4.1&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git push origin --tags
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Publish to npm&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">npm publish
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Of course, the commit and push are easier done direct from VScode.&lt;/p>
&lt;p>It is annoying that I can&amp;rsquo;t link the tag to the npm version.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://git-scm.com/book/en/v2/Git-Basics-Tagging">git docs 2.6 Git Basics - Tagging&lt;/a>&lt;/li>
&lt;/ul></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/development">Development</category><category domain="https://it.knightnet.org.uk/tags/git">git</category><category domain="https://it.knightnet.org.uk/tags/github">github</category><category domain="https://it.knightnet.org.uk/tags/npm">npm</category><category domain="https://it.knightnet.org.uk/tags/node.js">node.js</category><category domain="https://it.knightnet.org.uk/tags/nodejs">nodejs</category></item><item><title>List of problems and issues with Jekyll and GitHub Pages</title><link>https://it.knightnet.org.uk/kb/ghjekyll/github-pages-issues/</link><guid isPermaLink="true">https://it.knightnet.org.uk/kb/ghjekyll/github-pages-issues/</guid><pubDate>Fri, 05 Jan 2018 17:05:00 +0000</pubDate><guid>https://it.knightnet.org.uk/kb/ghjekyll/github-pages-issues/</guid><description><div>While sites generated using GitHub pages can use Jekyll to enhance them, there are some limitations and, it seems, a number of problems.</div><div>&lt;h2 id="advantages-not-matched-by-alternatives">Advantages (not matched by alternatives)&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>The Jekyll build process runs on the GitHub back end, no need for the horrible (on Windows anyway) installation of Ruby and Jekyll. (UPDATE: See Hugo alternative for a better alternative).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>GitHub provides an existing set of data about the owning organisation/person and their repos.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>Sorry, can&amp;rsquo;t think of any others that aren&amp;rsquo;t matched by alternative tools.&lt;/p>
&lt;h2 id="github-pages-issues">GitHub Pages Issues&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>Build failures generate error messages that are worse than useless. Often not even identifying the page that the build failed on.&lt;/p>
&lt;p>Hint: Connect the repo to cloundcannon.com - it will do builds and give more detailed error messages.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Looks like there may be some issues when creating pages directly from the GitHub web interface. I&amp;rsquo;ve managed to create several pages that show inconsistent metadata - I suspect they were all created via the web interface first. See &lt;a href="https://github.com/jekyll/jekyll/issues/6661">Issue #6661&lt;/a> and &lt;a href="https://totallyinformation.github.io/github-pages/test">this test page&lt;/a>. You can see that the test page is not able to reference its frontmatter metadata.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Jekyll uses Kramdown to render markdown files. This does not quite match the default GFM format. While this is improving, the version used is typically behind the current one, often by a fair margin.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="minima-theme-issues">Minima Theme Issues&lt;/h2>
&lt;p>While the Minima theme is pretty good, it has a few issues of its own.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>The documentation states that all you need to do to enable Disqus is to add your shortcode to &lt;code>_config.yml&lt;/code>. However, this is not quite correct as Disqus in only added to posts and not to pages or collection documents, nor to the home page.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The main menu does not work quite as expected. If a page doesn&amp;rsquo;t have a title, it is ignored, not terribly safe an assumption since an xml document might have a title but shouldn&amp;rsquo;t be shown or perhaps a page needed in the menu doesn&amp;rsquo;t have/need a title. Also, it excludes collection documents which isn&amp;rsquo;t too helpful if trying to switch to collections for better content management. A better selection would be {%raw%}&lt;code>site.pages | concat: site.documents | where: &amp;quot;layout&amp;quot;,&amp;quot;page&amp;quot;&lt;/code>{%endraw%} or something similar.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="jekyll-issues">Jekyll Issues&lt;/h2>
&lt;p>This list is about Jekyll failings, not specific to GitHub Pages.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>The sort filter does not work correctly. I have some code that includes &lt;code>{% for item in collection | sort: &amp;quot;title&amp;quot; %}&lt;/code> but several entries are incorrectly sorted.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Jekyll documentation is, in my opinion, poor. Information is badly spread between pages. For example, trying to find a comprehensive list of variable filters that actually work with Jekyll is difficult. Some documentation is left up to the core documentation of the Liquid templating engine. However, while that is comprehensive, it applies to the use of Liquid in its original environment, not everything works in Jekyll.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>There are too many inconsistent differences between different parts of Jekyll. For example, why are there so many differences in the schema definitions for Pages, Posts and Collection Documents?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>In the &lt;code>page&lt;/code> object, not all properties are set as one might expect. &lt;code>page.date&lt;/code> for example is not set unless you create it manually in the frontmatter. Again, not all page properties actually apply to &amp;ldquo;Pages&amp;rdquo;, some only apply to posts or collection documents. Highly confusing.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>In variable filters, the &lt;code>:&lt;/code> is an unnecessary source of bugs. It serves no real purpose, a simple space would be sufficient.&lt;/p>
&lt;/li>
&lt;/ul></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/development">Development</category><category domain="https://it.knightnet.org.uk/tags/jekyll">Jekyll</category><category domain="https://it.knightnet.org.uk/tags/static-site-generators">Static Site Generators</category><category domain="https://it.knightnet.org.uk/tags/github">GitHub</category><category domain="https://it.knightnet.org.uk/tags/github-pages">GitHub Pages</category></item></channel></rss>