<linkhref="https://mcshelby.github.io/hugo-theme-relearn/development/index.html"rel="canonical"type="text/html"title="Development :: Hugo Relearn Theme">
<linkhref="/hugo-theme-relearn/development/index.xml"rel="alternate"type="application/rss+xml"title="Development :: Hugo Relearn Theme">
<p>This chapter contains information only needed for development and maintaining the theme.</p>
<divclass="children children-h2 children-sort-">
<h2class="children-title"id="contributing"><ahref="/hugo-theme-relearn/development/contributing/index.html">Contributing</a></h2><p>What to know if you want to contribute</p>
<h2class="children-title"id="maintaining"><ahref="/hugo-theme-relearn/development/maintaining/index.html">Maintaining</a></h2><p>What to know as a maintainer</p>
<h2class="children-title"id="screenshots"><ahref="/hugo-theme-relearn/development/screenshots/index.html">Screenshots</a></h2><p>Recipe to create various documentation screenshots</p>
<h1class="a11y-only">Subsections of Development</h1>
<articleclass="default">
<headerclass="headline">
</header>
<h1id="contributing">Contributing</h1>
<h2id="code-quality">Code Quality</h2>
<p>A new release can happen at any time from the <code>main</code> branch of the <ahref="https://github.com/McShelby/hugo-theme-relearn"rel="external"target="_self">GitHub project</a> without further acknowledgment. This makes it necessary that, every pushed set of changesets into the <code>main</code> branch <strong>must</strong> be self-contained and correct, resulting in a releasable version.</p>
<p>Stay simple for the user by focusing on the mantra “convention over configuration”.</p>
<p>At installation the site should work reasonable without (m)any configuration.</p>
<p>Stay close to the Hugo way.</p>
<p>Don’t use npm or any preprocessing, our contributors may not be front-end developers.</p>
<p>Document new features in the docs. This also contains entries to the <ahref="/hugo-theme-relearn/introduction/releasenotes/index.html">What’s new</a> page.</p>
<p>Don’t break existing features if you don’t have to.</p>
<p>Remove reported issue from the browser’s console.</p>
<p>Check for unnecessary whitespace and correct indention of your resulting HTML.</p>
<p>Write commit messages in the <ahref="https://www.conventionalcommits.org/en/v1.0.0/"rel="external"target="_self">conventional commit</a> format.</p>
<p>Following is an inpomplete list of some of the used conventional commit types. Be creative.</p>
<p>This project tries to follow the <ahref="https://semver.org/"rel="external"target="_self">semver policy</a> - although not followed 100% in the past.</p>
<p>Usually an entry of <spanclass="badge cstyle warning badge-with-title"><spanclass="badge-title"><iclass="fa-fw fas fa-exclamation-triangle"></i></span><spanclass="badge-content">Breaking</span></span> on the <ahref="/hugo-theme-relearn/introduction/releasenotes/index.html">What’s new</a> page causes a new major release number.</p>
<p>All other entries on the <ahref="/hugo-theme-relearn/introduction/releasenotes/index.html">What’s new</a> page will increase the minor release number.</p>
<p>Releases resulting in a new major or minor number are called main release.</p>
<p>Releases containing bugfixes only, are only increasing the patch release number. Those releases don’t result in announcements on the <ahref="/hugo-theme-relearn/introduction/releasenotes/index.html">What’s new</a> page.</p>
<p>Entries on the <ahref="/hugo-theme-relearn/introduction/releasenotes/index.html">What’s new</a> page are checked and enforced during the <code>version-release</code> GitHub Action.</p>
<h2id="managing-issues">Managing Issues</h2>
<p>Issues are categorized and managed by assigning <ahref="/hugo-theme-relearn/development/maintaining/index.html#labels">labels</a> to it.</p>
<p>Once working on an issue, assign it to a fitting maintainer.</p>
<p>When done, close the ticket. Once an issue is closed, it needs to be assigned to next release milestone.</p>
<p>A once released ticket is not allowed to be reopened and rereleased in a different milestone. This would cause the changelog to be changed even for the milestone the issue was previously released in. Instead write a new ticket.</p>
<p>If the issue would cause a new main release due to <ahref="/hugo-theme-relearn/development/maintaining/index.html#semver">semver semantics</a> it needs one of the according labels and the matching badge on the <ahref="/hugo-theme-relearn/introduction/releasenotes/index.html">What’s new</a> page.</p>
<p>You can assign one further label out of the following list to signal readers that development on an open issue is currently halted for different reasons.</p>
<td>This is a topic related to Mermaid itself but not the theme</td>
</tr>
</tbody>
</table>
<h2id="setting-up-a-development-environment">Setting Up a Development Environment</h2>
<p>Git Hooks are used to automate some tasks. They are stored in the <code>.githooks</code> root folder.</p>
<p>Documentation for each hook is contained in each file.</p>
<p>At least the <code>pre-commit</code> hook is required, as it updates the version number on each commit. This helps to help debugging of user related issues.</p>
<h2id="making-releases">Making Releases</h2>
<p>A release is based on a milestone named like the release itself - just the version number, eg: <code>1.2.3</code>. It’s in the maintainers responsibility to check <ahref="/hugo-theme-relearn/development/maintaining/index.html#semver">semver semantics</a> of the milestone’s name prior to release and change it if necessary.</p>
<p>Making releases is automated by the <code>version-release</code> GitHub Action. It requires the version number of the milestone that should be released. The release will be created from the <code>main</code> branch of the repository.</p>
<p>Treat released milestones as immutable. Don’t rerelease an already released milestone. An already released milestone may already been consumed by your users.</p>
<p>During execution of the action a few things are checked. If a check fails the action fails, resulting in no new release. You can correct the errors afterwards and rerun the action.</p>
<p>The following checks will be enforced</p>
<ul>
<li>the milestone exists</li>
<li>there is at least one closed issue assigned to the milestone</li>
<li>all assigned issues for this milestone are closed</li>
<li>if it’s a main release, there must be an accompanying releasenotes file present in the repo at <code>introduction/releasenotes/<major>/<minor>.en.md</code></li>
</ul>
<p>After a successful run of the action</p>
<ul>
<li>the changelog at <code>introduction/changelog/<major>/<minor>/<patch>.<lang>.md</code> is created for english and piratish, including missing generic upper level files</li>
<li>the <code>CHANGELOG.md</code> is updated</li>
<li>the releasenotes at <code>introduction/releasenotes/<major>/<minor>.en.md</code> are updated, including release version and release date</li>
<li>missing generic upper level files for english and piratish are created</li>
<li>the version number for the <code><meta generator></code> is updated</li>
<li>the updated files are committed</li>
<li>the milestone is closed</li>
<li>the repository is tagged with the version number (eg. <code>1.2.3</code>), the main version number (eg. <code>1.2.x</code>) and the major version number (eg. <code>1.x</code>)</li>
<li>a new entry in the <ahref="https://github.com/McShelby/hugo-theme-relearn/releases"rel="external"target="_self">GitHub release list</a> with the according changelog will be created</li>
<li>the <ahref="https://mcshelby.github.io/hugo-theme-relearn/"rel="external"target="_self">official documentation</a> is built and deployed</li>
<li>the version number for the <code><meta generator></code> is updated to a temporary and committed (this helps to determine if users are running directly on the main branch or are using releases)</li>
<li>a new milestone for the next patch release is created (this can later be renamed to a main release if necessary)</li>
<p>Show the <ahref="/hugo-theme-relearn/development/screenshots/index.html#demo-screenshot">Demo Screenshot</a> page on different devices and different themes. Composition of the different device screenshots into a template.</p>
<p>The content should be:</p>
<ul>
<li>consistent: always use the same page for all devices</li>
<li>pleasing: use a delightful background</li>
</ul>
<p><strong>Used by</strong>:</p>
<ul>
<li>Hugo Themes notes: <ahref="https://themes.gohugo.io/themes/hugo-theme-relearn/"rel="external"target="_self">https://themes.gohugo.io/themes/hugo-theme-relearn/</a><em>1280 x 640</em></li>
<li>GitHub project site: <ahref="https://github.com/McShelby/hugo-theme-relearn"rel="external"target="_self">https://github.com/McShelby/hugo-theme-relearn</a><em>1280 x 640</em></li>
<li>GitHub social media preview: <ahref="https://github.com/McShelby/hugo-theme-relearn/settings"rel="external"target="_self">https://github.com/McShelby/hugo-theme-relearn/settings</a><em>1280 x 640</em></li>
<li>Desktop: light theme <em>1440 x 900 @ 1</em></li>
<li>Tablet: light theme <em>778 x 1038 @ 1</em></li>
<li>Phone: dark theme <em>450 x 801 @ .666</em></li>
<li>From original template resize to <em>3000 x 1500</em> offset y: <em>-330</em>, scale to <em>1280 x 640</em> and save as <code>images/hero.png</code></li>