<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fa"><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://homaparan.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://homaparan.github.io/" rel="alternate" type="text/html" hreflang="fa" /><updated>2026-02-28T03:12:45+00:00</updated><id>https://homaparan.github.io/feed.xml</id><title type="html">Homaparan</title><subtitle>گروه هماپران دانش یک گروه علمی آموزشی است.</subtitle><entry><title type="html">Creating a post series</title><link href="https://homaparan.github.io/2021/10/30/creating-a-post-series/" rel="alternate" type="text/html" title="Creating a post series" /><published>2021-10-30T09:00:07+00:00</published><updated>2021-10-30T09:00:07+00:00</updated><id>https://homaparan.github.io/2021/10/30/creating-a-post-series</id><content type="html" xml:base="https://homaparan.github.io/2021/10/30/creating-a-post-series/"><![CDATA[<p>From version 0.12, you can now make a post a part of a series of posts, linking to the other posts in the series, by creating a <code class="language-plaintext highlighter-rouge">series</code> data file and then setting the series in each of the post’s front matter.</p>

<p>The current post in the list is highlighted to help give context of where you are in the series.</p>

<h2 id="blog-series-data-file">Blog Series Data File</h2>

<p>Start by creating a yml file in the _data directory, for example <code class="language-plaintext highlighter-rouge">my_blog_series.yml</code>. Give the series a title and, optionally, a description.</p>

<h2 id="sections">Sections</h2>

<p>Next add sections. Each section can have a label (optional) and items. Each item is the title of an existing blog post. If the title is not found then the link will be empty.</p>

<p>If you just want one list without labels, then omit the label and just add the items.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">title</span><span class="pi">:</span> <span class="s">The series title</span>
<span class="na">sections</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">items</span><span class="pi">:</span>
      <span class="pi">-</span> <span class="na">title</span><span class="pi">:</span> <span class="s">Why use a static site generator</span>
      <span class="pi">-</span> <span class="na">title</span><span class="pi">:</span> <span class="s">Getting started with Bulma Clean Theme for Jekyll</span>
</code></pre></div></div>

<p>Here is a full example with multiple sections with labels.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">title</span><span class="pi">:</span> <span class="s">The series title</span>
<span class="na">description</span><span class="pi">:</span> <span class="s">The series description text</span>
<span class="na">sections</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">label</span><span class="pi">:</span> <span class="s">The first section</span>
    <span class="na">items</span><span class="pi">:</span>
      <span class="pi">-</span> <span class="na">title</span><span class="pi">:</span> <span class="s">Why use a static site generator</span>
      <span class="pi">-</span> <span class="na">title</span><span class="pi">:</span> <span class="s">Getting started with Bulma Clean Theme for Jekyll</span>
  <span class="pi">-</span> <span class="na">label</span><span class="pi">:</span> <span class="s">Another section</span>
    <span class="na">items</span><span class="pi">:</span>
      <span class="pi">-</span> <span class="na">title</span><span class="pi">:</span> <span class="s">Introducing some new layouts to Bulma Clean Theme</span>
      <span class="pi">-</span> <span class="na">title</span><span class="pi">:</span> <span class="s">Creating a docs site with Bulma Clean Theme</span>
      <span class="pi">-</span> <span class="na">title</span><span class="pi">:</span> <span class="s">Creating a post series</span>
</code></pre></div></div>

<h2 id="update-your-posts">Update your posts</h2>

<p>Finally, add the series setting to your front matter in each post you want the series to show in.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">series</span><span class="pi">:</span> <span class="s">my_blog_series</span>
</code></pre></div></div>]]></content><author><name></name></author><category term="bulma-clean-theme" /><category term="jekyll" /><category term="blog" /><summary type="html"><![CDATA[How to create a post series with Bulma Clean Theme]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://homaparan.github.io/bulma-clean-theme/img/blog-post-series.jpg" /><media:content medium="image" url="https://homaparan.github.io/bulma-clean-theme/img/blog-post-series.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Creating a docs site with Bulma Clean Theme</title><link href="https://homaparan.github.io/2020/05/08/creating-a-docs-site-with-bulma-clean-theme/" rel="alternate" type="text/html" title="Creating a docs site with Bulma Clean Theme" /><published>2020-05-08T09:00:07+00:00</published><updated>2020-05-08T09:00:07+00:00</updated><id>https://homaparan.github.io/2020/05/08/creating-a-docs-site-with-bulma-clean-theme</id><content type="html" xml:base="https://homaparan.github.io/2020/05/08/creating-a-docs-site-with-bulma-clean-theme/"><![CDATA[<p>I created Bulma Clean Theme as a theme for my own website and decided to open source it so others could use it as well. One of the key things I wanted to do was to create a theme that worked with GitHub Pages, which also means that you can also use it as a docs site for your project.</p>

<h2 id="github-pages-configuration">GitHub Pages Configuration</h2>

<p>GitHub pages allows you to create a website for your project with free hosting. Go to your repo on GitHub, then click Settings, then scroll down to the GitHub Pages section. You have the option to create a site from the root of your master branch of from the /docs directory in your master branch. For this example, we are going to use the /docs directory.</p>

<p>Don’t change this setting just yet as if you don’t have a docs directory there will be nothing there to publish.</p>

<h2 id="creating-the-docs-directory">Creating the docs directory</h2>

<p>Clone your git repo to a local directory, let’s say <code class="language-plaintext highlighter-rouge">~/code/my-project</code> for this example. The below assumes you don’t yet have a docs directory and you have <a href="https://jekyllrb.com/docs/installation/">jekyll installed</a>. If you do already have a docs directory you will have to rename it to something else.</p>

<p>Create a new jekyll installation in the docs directory, ensuring you replace your username and project name in the below example.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/username/my-project.git ~/code/my-project
<span class="nb">cd</span> ~/code/my-project
jekyll new docs
</code></pre></div></div>

<p>You should now have a base install of Jekyll in your freshly created docs directory.</p>

<h2 id="configuring-the-theme">Configuring the theme</h2>

<ol>
  <li>Replace everything in the Gemfile with the following
    <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source 'https://rubygems.org'
gem "bulma-clean-theme",  '0.7.2'
gem 'github-pages', group: :jekyll_plugins
</code></pre></div>    </div>
  </li>
  <li>Open the <code class="language-plaintext highlighter-rouge">_config.yml</code> and comment out or delete the line <code class="language-plaintext highlighter-rouge">theme: minima</code> and replace it with <code class="language-plaintext highlighter-rouge">remote_theme: chrisrhymes/bulma-clean-theme</code>, then add <code class="language-plaintext highlighter-rouge">github-pages</code> to the list of plugins. Update the baseurl to your GitHub repo name, in this example we are using <code class="language-plaintext highlighter-rouge">my-project</code> as the repo name
    <div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">#theme: minima</span>
<span class="na">remote_theme</span><span class="pi">:</span> <span class="s">chrisrhymes/bulma-clean-theme</span>
<span class="na">baseurl</span><span class="pi">:</span> <span class="s2">"</span><span class="s">/my-project"</span>
<span class="na">plugins</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">github-pages</span>
</code></pre></div>    </div>
  </li>
  <li>Open the <code class="language-plaintext highlighter-rouge">index.md</code> file and update the front matter so the layout is page and then add a title
    <div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">layout</span><span class="pi">:</span> <span class="s">page</span>
<span class="na">title</span><span class="pi">:</span> <span class="s">Docs for My Project</span>
</code></pre></div>    </div>
  </li>
  <li>
    <p>Run <code class="language-plaintext highlighter-rouge">bundle install</code> and then <code class="language-plaintext highlighter-rouge">bundle exec jekyll serve</code></p>
  </li>
  <li>Visit <code class="language-plaintext highlighter-rouge">http://localhost:4000/my-project/</code> to view your new docs page.</li>
</ol>

<h2 id="menu">Menu</h2>

<p>To create a menu on the left on your docs page you need to create a new yaml file in _data directory, such as <code class="language-plaintext highlighter-rouge">menu.yaml</code> and then use the below format, where the label will be the menu title and the items are the menu items. Each menu item can have a list of sub menu items if needed.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">label</span><span class="pi">:</span> <span class="s">Example Menu</span>
  <span class="na">items</span><span class="pi">:</span>
    <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">Menu item</span>
      <span class="na">link</span><span class="pi">:</span> <span class="s">/link/</span>
      <span class="na">items</span><span class="pi">:</span>
        <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">Sub menu item</span> 
          <span class="na">link</span><span class="pi">:</span> <span class="s">/sub-menu-item/</span>
</code></pre></div></div>

<h2 id="table-of-contents">Table of contents</h2>

<p>If you would like auto generated table of contents for your docs page then add <code class="language-plaintext highlighter-rouge">toc: true</code> to the page’s front matter. The table of contents works for markdown pages and loops through the heading 2s and heading 3s in the markdown and then auto generates the contents.</p>

<h2 id="github-sponsors">GitHub Sponsors</h2>

<p>If you want to link to your GitHub sponsors profile then add <code class="language-plaintext highlighter-rouge">gh_sponsor</code> with your username to the <code class="language-plaintext highlighter-rouge">_config.yml</code> file.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gh_sponsor: chrisrhymes
</code></pre></div></div>

<h2 id="making-the-docs-page-live">Making the docs page live</h2>

<p>Once you have finished creating your docs page you can commit your changes and push everything up to GitHub. Go back to the GitHub settings page and scroll back down to the GitHub Pages section. Now we can update the setting to use the Master branch /docs folder and then GitHub will build your new docs page.</p>

<h2 id="want-to-see-an-example">Want to see an example?</h2>

<p>I recently updated one of my own packages to use Bulma Clean Theme to power the docs page. Check out the docs for <a href="https://www.csrhymes.com/bulma-block-list">Bulma Block List</a> as an example.</p>]]></content><author><name></name></author><category term="bulma-clean-theme" /><category term="jekyll" /><category term="docs" /><summary type="html"><![CDATA[How to create a docs site for your project with Bulma Clean Theme]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.csrhymes.com/img/example-docs-page.jpg" /><media:content medium="image" url="https://www.csrhymes.com/img/example-docs-page.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Introducing some new layouts to Bulma Clean Theme</title><link href="https://homaparan.github.io/2019/07/23/introducing-some-new-layouts-to-bulma-clean-theme/" rel="alternate" type="text/html" title="Introducing some new layouts to Bulma Clean Theme" /><published>2019-07-23T08:00:07+00:00</published><updated>2019-07-23T08:00:07+00:00</updated><id>https://homaparan.github.io/2019/07/23/introducing-some-new-layouts-to-bulma-clean-theme</id><content type="html" xml:base="https://homaparan.github.io/2019/07/23/introducing-some-new-layouts-to-bulma-clean-theme/"><![CDATA[<p>I’ve been meaning to write about some of the new features I have been rolling out to my Jekyll theme, <a href="https://www.csrhymes.com/bulma-clean-theme/">Bulma Clean Theme</a>, for a while but I have only just managed to push the update for the landing page layout last weekend. This article provides some of the thinking behind the updates, as well as a brief introduction to how to get started.</p>

<h2 id="product-pages">Product Pages</h2>

<p>I use the theme to power my own personal website and decided that it would be good to update my <a href="https://www.csrhymes.com/books">book pages</a>, or book page as it was then. The page had used a very simple layout with both books on one page and was not really up to scratch. I decided it would be better to make each book its own page, and if I ever get round to it and write another book it would be easy to add another to the site in the future. Rather than just building these pages for my own site, I thought it would be a nice addition to the base theme.</p>

<p>I really like Jekyll as it is simple to use, but also very powerful. I decided to make the most of the frontmatter and allow you to set most of the product information in there, leaving the main content of the page for the text description.</p>

<p>To get started, create your product pages inside a <code class="language-plaintext highlighter-rouge">_products</code> directory as we will make use of collections later on.</p>

<p>The below is an example of the frontmatter for the product page. The product page uses the same hero, title and subtitle settings as other pages, but has additional settings for product code, image, price, rating and features. The product code is important for later on.</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
<span class="na">title</span><span class="pi">:</span> <span class="s">Product 1 Name</span>
<span class="na">subtitle</span><span class="pi">:</span> <span class="s">Product 1 tagline here</span>
<span class="na">description</span><span class="pi">:</span> <span class="s">This is a product description</span>
<span class="na">hero_image</span><span class="pi">:</span> <span class="s">/img/hero-img.jpg</span>
<span class="na">product_code</span><span class="pi">:</span> <span class="s">ABC124</span>
<span class="na">layout</span><span class="pi">:</span> <span class="s">product</span>
<span class="na">image</span><span class="pi">:</span> <span class="s">https://via.placeholder.com/640x480</span>
<span class="na">price</span><span class="pi">:</span> <span class="s">£1.99 + VAT</span>
<span class="na">features</span><span class="pi">:</span>
    <span class="pi">-</span> <span class="na">label</span><span class="pi">:</span> <span class="s">Great addition to any home</span>
      <span class="na">icon</span><span class="pi">:</span> <span class="s">fa-location-arrow</span>
    <span class="pi">-</span> <span class="na">label</span><span class="pi">:</span> <span class="s">Comes in a range of styles</span>
      <span class="na">icon</span><span class="pi">:</span> <span class="s">fa-grin-stars</span>
    <span class="pi">-</span> <span class="na">label</span><span class="pi">:</span> <span class="s">Available in multiple sizes</span>
      <span class="na">icon</span><span class="pi">:</span> <span class="s">fa-fighter-jet</span>
<span class="na">rating</span><span class="pi">:</span> <span class="m">3</span>
<span class="nn">---</span>
</code></pre></div></div>

<p>The features provides a way of making a bullet point list of the key product features, but instead of plain disc bullet points you can use font awesome icons to make it a bit more interesting.</p>

<p>I don’t know about you, but sometimes I spend longer deciding on what icon to use than making the rest of the page.</p>

<p>I’ve deliberately made the product pages have a 4 by 3 image ratio as I feel it works best across different screen sizes. Like all themes, if you want to change it you can override the default layouts if you want a different ratio.</p>

<p>Once you have created your product pages, you will need to tell Jekyll to output them. This is done by adding collections settings in the <code class="language-plaintext highlighter-rouge">_config.yml</code> for your site.</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">collections</span><span class="pi">:</span>
  <span class="na">products</span><span class="pi">:</span> 
    <span class="na">output</span><span class="pi">:</span> <span class="no">true</span>
    <span class="na">layout</span><span class="pi">:</span> <span class="s">product</span>
    <span class="na">image</span><span class="pi">:</span> <span class="s">https://via.placeholder.com/800x600</span>
    <span class="na">show_sidebar</span><span class="pi">:</span> <span class="no">false</span>
</code></pre></div></div>

<p>Now when you run jekyll build it will output a load of product pages for you, now we just need a way of getting to them. This is where the product category page comes in.</p>

<h2 id="product-category">Product Category</h2>

<p>Create a page, such as products.md or in my case books.md and set it to use the product-category layout. This will generate a list of the products, but you can also add some introduction content in the main content section of the page if you so desire.</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
<span class="na">title</span><span class="pi">:</span> <span class="s">Products</span>
<span class="na">subtitle</span><span class="pi">:</span> <span class="s">Check out our range of products</span>
<span class="na">layout</span><span class="pi">:</span> <span class="s">product-category</span>
<span class="na">show_sidebar</span><span class="pi">:</span> <span class="no">false</span>
<span class="na">sort</span><span class="pi">:</span> <span class="s">title</span>
<span class="nn">---</span>


<span class="s">This is some page content and it will appear above the product list.</span>
</code></pre></div></div>

<h2 id="product-reviews">Product Reviews</h2>

<p>The last addition to the product pages is reviews. If you would like to list some customer reviews on your product pages, then you will need to create a reviews directory inside _data and create a separate file for each product with reviews, named after the product code. For example <code class="language-plaintext highlighter-rouge">_data/reviews/ABC124.yml</code></p>

<p>The data file should follow the below format. The name is the customer name, the rating is how many stars out of 5, the title is the main title of the review and the avatar is a link to an image, if you have one. If you don’t have a customer image then just omit it and a user icon will be used instead. Lastly, the description is the main content of the review.</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">Mr E Xample</span>
  <span class="na">rating</span><span class="pi">:</span> <span class="m">4</span>
  <span class="na">title</span><span class="pi">:</span> <span class="s">Great product, highly recommended</span>
  <span class="na">date</span><span class="pi">:</span> <span class="s">01/01/2019</span>
  <span class="na">avatar</span><span class="pi">:</span> <span class="s">https://bulma.io/images/placeholders/128x128.png</span>
  <span class="na">description</span><span class="pi">:</span> <span class="pi">&gt;</span>
    <span class="s">The product worked really well. I would recommend this to most people to use. Delivery was quick and reasonable. </span>
    <span class="s">Would recommend this to my friends. </span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">Mrs R E View</span>
  <span class="na">rating</span><span class="pi">:</span> <span class="m">5</span>
  <span class="na">title</span><span class="pi">:</span> <span class="s">Nice, really liked this</span>
  <span class="na">date</span><span class="pi">:</span> <span class="s">02/02/2019</span>
  <span class="na">description</span><span class="pi">:</span> <span class="pi">&gt;</span>
    <span class="s">The product worked exactly as described.</span>
</code></pre></div></div>

<p>Example <a href="https://www.csrhymes.com/bulma-clean-theme/products/">product category and product pages</a> can be seen on the theme’s demo site here if you want to take a look.</p>

<h2 id="landing-page-layout">Landing Page Layout</h2>

<p>I was thinking it would be good to create a landing style page so I could highlight a new project or something I was working on separately from the main projects page already on my site. Rather than create a new layout I thought it would be better to enhance the existing page layout so you could choose to use these features if you so desired.</p>

<p>I started by adding a call to action (otherwise known as a large button) in the hero at the top of the page. This can be used by adding hero_link and hero_link_text to the frontmatter.</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
<span class="na">layout</span><span class="pi">:</span> <span class="s">page</span>
<span class="na">title</span><span class="pi">:</span> <span class="s">Example Landing Page</span>
<span class="na">subtitle</span><span class="pi">:</span> <span class="s">This is an example landing page with callouts</span>
<span class="na">hero_height</span><span class="pi">:</span> <span class="s">is-large</span>
<span class="na">hero_link</span><span class="pi">:</span> <span class="s">/page-1/</span>
<span class="na">hero_link_text</span><span class="pi">:</span> <span class="s">Example Call To Action</span>
<span class="nn">---</span>
</code></pre></div></div>

<p>Next, I wanted to make some nice callouts to help shout about key features of whatever you are talking about on your landing page. This started out as a simple icon and a title, but slowly evolved to allow for a subtitle, description text and a call to action button as well.</p>

<p>To make it more flexible, only the title and subtitle are required and the rest can be used as and when necessary.</p>

<p>To make the callouts reusable in different pages on your site, the content is defined in a datafile, for example, example_callouts.yml. The below shows the example structure for the callouts.</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">style</span><span class="pi">:</span> <span class="s">is-light</span>
<span class="na">items</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">title</span><span class="pi">:</span> <span class="s">Example callout </span><span class="m">1</span>
    <span class="na">subtitle</span><span class="pi">:</span> <span class="s">Example subtitle </span><span class="m">1</span>
    <span class="na">icon</span><span class="pi">:</span> <span class="s">fa-space-shuttle</span>
    <span class="na">description</span><span class="pi">:</span> <span class="pi">&gt;</span>
      <span class="s">The example description text goes here and can be multiple lines.</span>

      <span class="s">For example, such as this. </span>
    <span class="na">call_to_action_name</span><span class="pi">:</span> <span class="s">Call to action </span><span class="m">1</span>
    <span class="na">call_to_action_link</span><span class="pi">:</span> <span class="s">/page-1/</span>
</code></pre></div></div>

<p>The style is the style of the hero that the callouts are contained in. This makes use of Bulma hero styles.</p>

<p>Then to display the callouts on the page, add a callouts setting to the pages frontmatter with the name of the data file without the extension.</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
<span class="na">layout</span><span class="pi">:</span> <span class="s">page</span>
<span class="na">title</span><span class="pi">:</span> <span class="s">Example Landing Page</span>
<span class="na">subtitle</span><span class="pi">:</span> <span class="s">This is an example landing page</span>
<span class="na">callouts</span><span class="pi">:</span> <span class="s">example_callouts</span>
<span class="nn">---</span>
</code></pre></div></div>

<p>An example <a href="https://www.csrhymes.com/bulma-clean-theme/landing/">landing page layout</a> can be seen in the theme’s demo site.</p>

<h2 id="what-do-you-think">What do you think?</h2>

<p>I’ve tried to make these additions easy to use and flexible where possible. I’ve updated the readme file and the theme demo site with more information to help you get started with these new features.</p>

<p>If you decide to give the theme a go, it would be great to see how you are using it and if you have any ideas of how it can be developed further. You never know, if I get enough responses then I may even make a showcase page on the demo theme site to highlight how others are using it.</p>]]></content><author><name></name></author><category term="webdev" /><category term="showdev" /><category term="webdesign" /><summary type="html"><![CDATA[Introducing Product Pages and Landing Pages for Bulma Clean Theme]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.csrhymes.com/img/landing-page.jpg" /><media:content medium="image" url="https://www.csrhymes.com/img/landing-page.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Getting started with Bulma Clean Theme for Jekyll</title><link href="https://homaparan.github.io/development/2019/02/09/getting-started-with-bulma-clean-theme/" rel="alternate" type="text/html" title="Getting started with Bulma Clean Theme for Jekyll" /><published>2019-02-09T20:00:07+00:00</published><updated>2019-02-09T20:00:07+00:00</updated><id>https://homaparan.github.io/development/2019/02/09/getting-started-with-bulma-clean-theme</id><content type="html" xml:base="https://homaparan.github.io/development/2019/02/09/getting-started-with-bulma-clean-theme/"><![CDATA[<p>I have made a <a href="https://rubygems.org/gems/bulma-clean-theme">theme for Jekyll</a> which is based on the Bulma frontend framework. It might look familiar, because I am also using it for this site. If you like the look of this theme then I thought I would write a little blog post about how to use it for your own site and how you can use it with GitHub Pages.</p>

<h2 id="getting-started">Getting started</h2>

<p>First things first, you need a local instance of Jekyll running on your computer. I’m assuming you are familiar with Jekyll and have everything you need installed. If this is not the case, check out the documentation on the <a href="https://jekyllrb.com/docs/">Jekyll website</a>. For this example, lets call the site myblog.</p>

<p>Create a new installation of Jekyll, then go into the myblog directory:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jekyll new myblog
<span class="nb">cd </span>myblog
</code></pre></div></div>

<p>Then add the theme to the Gemfile:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gem "bulma-clean-theme"
</code></pre></div></div>

<p>Then add the theme to your _config.yml:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">theme</span><span class="pi">:</span> <span class="s">bulma-clean-theme</span>
</code></pre></div></div>

<p>Then run bundle to install everything</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bundle
</code></pre></div></div>

<p>You can then preview your site by running the usual command</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bundle <span class="nb">exec </span>jekyll serve
</code></pre></div></div>

<h2 id="creating-pages">Creating pages</h2>

<p>A page can either be a html or a markdown file, as long as you set the frontmatter. There are a few settings that pages can use to customise the default theme a bit further if you so choose.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
<span class="na">layout</span><span class="pi">:</span> <span class="s">page</span>
<span class="na">title</span><span class="pi">:</span> <span class="s">Page Title</span>
<span class="na">subtitle</span><span class="pi">:</span> <span class="s">Page Subtitle</span>
<span class="na">image</span><span class="pi">:</span> <span class="s">/path/to/image.jpg</span>
<span class="na">description</span><span class="pi">:</span> <span class="s">The pages meta description</span>
<span class="na">hero_image</span><span class="pi">:</span> <span class="s">/path/to/hero-image.jpg</span>
<span class="na">hero_height</span><span class="pi">:</span> <span class="s">is-fullheight</span>
<span class="nn">---</span>
</code></pre></div></div>

<p>If you don’t set a subtitle, image, hero_image or hero_height then defaults will be used or in the case of the hero_image, no image will be used on the hero.</p>

<p>The theme uses the jekyll-seo-tag plugin so it will use the information you provide in the frontmatter to auto populate the meta tags and open graph tags.</p>

<h2 id="posts">Posts</h2>

<p>Posts are created as per the standard Jekyll method, in a _posts directory, with each post named YYYY-MM-DD-name-of-post.markdown. For the post frontmatter you can use the same settings as a page, except you need to change the layout to post and add date and author settings.</p>

<h2 id="blog-page">Blog page</h2>

<p>For the blog homepage, create a blog.html page with <code class="language-plaintext highlighter-rouge">layout: blog</code> and use the other settings from a normal page. The theme is set up to use jekyll-paginate so you just need to add pagination options to your _config.yml</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Pagination settings</span>
<span class="na">paginate</span><span class="pi">:</span> <span class="m">5</span>
<span class="na">paginate_path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">/blog/page:num"</span>
</code></pre></div></div>

<h2 id="site-defaults">Site defaults</h2>

<p>If you don’t want to set each hero_image individually, then you can set default values in your _config.yml. The below example sets a default author, layout and hero image for every post. It also turns on the side bar on the right of post pages, which will display links to your latest posts.</p>

<div class="language-yml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">defaults</span><span class="pi">:</span>
  <span class="pi">-</span>
    <span class="na">scope</span><span class="pi">:</span>
      <span class="na">path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span>
      <span class="na">type</span><span class="pi">:</span> <span class="s2">"</span><span class="s">posts"</span>
    <span class="na">values</span><span class="pi">:</span>
      <span class="na">author</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Author</span><span class="nv"> </span><span class="s">Name"</span>
      <span class="na">layout</span><span class="pi">:</span> <span class="s">post</span>
      <span class="na">hero_image</span><span class="pi">:</span> <span class="s">/path/to/hero-image.jpg</span>
      <span class="na">show_sidebar</span><span class="pi">:</span> <span class="no">true</span>
</code></pre></div></div>

<h2 id="styles">Styles</h2>

<p>The theme uses Bulma frontend framework which provides a wide range of sass variable customisations. If you want to overwrite any of the standard variables, such as the primary theme colour, then set a sass variable in a new file in assets/css/app.scss before importing the main stylesheet.</p>

<div class="language-scss highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">---</span><span class="err">
</span><span class="na">---</span><span class="err">
$</span><span class="na">primary</span><span class="p">:</span> <span class="mh">#333333</span><span class="p">;</span>
<span class="c1">// Import Main CSS file from theme</span>
<span class="k">@import</span> <span class="s2">"main"</span><span class="p">;</span>
</code></pre></div></div>

<p>You can also add any of your own custom css to this file if you want to.</p>

<h3 id="navigation">Navigation</h3>

<p>Once you have created posts and pages, you will need to create a way for visitors to access them. The theme makes use of the Bulma navbar, which is configured through a simple yaml file. All you need to do is create a navigation.yml file in <code class="language-plaintext highlighter-rouge">_data</code> directory with the following format with the pages you want to include in the top navigation. You can now also add items to a dropdown menu.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">Page </span><span class="m">1</span>
  <span class="na">link</span><span class="pi">:</span> <span class="s">page-1</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">Blog</span>
  <span class="na">link</span><span class="pi">:</span> <span class="s">blog</span>
  <span class="na">dropdown</span><span class="pi">:</span> 
    <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">Page </span><span class="m">2</span>
      <span class="na">link</span><span class="pi">:</span> <span class="s">page-2</span>
</code></pre></div></div>

<p>Bulma is pretty handy in the way it converts the same HTML into a mobile / tablet friendly navigation, so you only need to set the menu up once for all screen sizes.</p>

<h2 id="using-bulma-clean-theme-with-github-pages">Using bulma-clean-theme with Github Pages</h2>

<p>For the site to work with Github Pages, all you need to do is update the _config.yml so it uses remote_theme instead of theme and update it to chrisrhymes/bulma-clean-theme so it knows which GitHub repo to pull the theme from when it builds your site.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">#theme: bulma-clean-theme</span>
<span class="na">remote_theme</span><span class="pi">:</span> <span class="s">chrisrhymes/bulma-clean-theme</span>
</code></pre></div></div>

<p>And then push up your changes to Github as normal.</p>

<p>There seems to be an issue where Jekyll doesn’t work locally with remote_theme, so when working locally you have to add theme back in, but remember to comment theme out again before pushing back up to GitHub or you will probably get a build warning email.</p>

<h2 id="i-hope-youre-not-feeling-overwhelmed">I hope you’re not feeling overwhelmed</h2>

<p>It may seem like there is a lot to do to get started, but really it shouldn’t take very long to get a site up and running. All the options are there just in case you want to further customise the theme to be more personal to you, but you can just use the basic minimal settings to get yourself up and running.</p>

<h2 id="feedback-and-issues">Feedback and Issues</h2>

<p>If you have any feedback, ideas or issues with how the theme could be improved, then please create an issue on the theme’s GitHub page and I will try and take a look into it as soon as I can. The theme is still quite new and I have quite a few ideas for future enhancements, so I will write a new blog post on this site when any new features become available.</p>]]></content><author><name></name></author><category term="development" /><summary type="html"><![CDATA[Getting started with Bulma Clean Theme for Jekyll and using it with GitHub Pages]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.csrhymes.com/img/bulma-clean-theme.jpg" /><media:content medium="image" url="https://www.csrhymes.com/img/bulma-clean-theme.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Why use a static site generator</title><link href="https://homaparan.github.io/development/2018/05/28/why-use-a-static-site-generator/" rel="alternate" type="text/html" title="Why use a static site generator" /><published>2018-05-28T10:50:07+00:00</published><updated>2018-05-28T10:50:07+00:00</updated><id>https://homaparan.github.io/development/2018/05/28/why-use-a-static-site-generator</id><content type="html" xml:base="https://homaparan.github.io/development/2018/05/28/why-use-a-static-site-generator/"><![CDATA[<p>There are many ways to make a website and many different CMS platforms you can use, such as WordPress and Joomla, as well as site builder tools that offer you drag and drop interfaces, but what about static site generators?</p>

<p>A static site is pretty much what it sounds like, a set of pre generated html pages. Other platforms take what you enter into the CMS and process the information stored in the database, alongside a template or many template partials and dynamically construct the page before serving the html to you in your browser.</p>

<h2 id="speed">Speed</h2>
<p>The initial advantage of a static site over a dynamic, database driven site is the page speed as means a lot less processing has to be done before the page is delivered. Some CMS’s provide caching which means that the first visitor to the page gets a dynamic version and then stores a cache of the page. This means subsequent visitor to the page gets the page quicker than the first. If you have a regularly cleared cache, or low numbers of visitors, subsequent visitors may not benefit from the caching and would all experience the increased load times.</p>

<h2 id="version-control">Version Control</h2>
<p>The next advantage of a static site is that it is that it can be version controlled. Usually a CMS relies on a database, which means that if you delete a page or some page content you either have to have revisions enabled in your CMS so you can roll back to a previous version or you need regular backups of your database so you can roll that back to a previous version. A static site with version control means you can easily revert to a previous version of your site and content without the need for database manipulation.</p>

<h2 id="data-files">Data Files</h2>
<p>Static sites, such as Jekyll, also offer a way of storing data in a more human readable format, such as yaml or JSON. This means you can store data that is used in multiple places across your site in one file and reference it in many places. For example, you may have a data file containing products, which you want to list in a category page and a product details page and maybe feature it on the homepage as well. These files can also be version controlled, meaning any changes or updates to your datafiles can be undone easily. The files can also be easily edited in a text editor so if you need to make multiple product amends, such as updating a misspelt brand name you can use something as simple as find and replace to update the spelling in all places at once without having to navigate to multiple different pages in a CMS.</p>

<h2 id="design-freedom">Design Freedom</h2>
<p>The biggest benefit I find to a static site is there is more freedom for a frontend developer and how they design and build your site. Some CMS’s work in a particular way and you are limited by the way they work. Page builders are available for many CMS’s but it often results in a lot of effort to get a particular piece of content in a particular place on the page.</p>

<p>A static site generator gives you more freedom to write your own html and text onto the page in the format you want it, rather than having to customise or overwrite the html and css classes output by the page builder tool.</p>

<h2 id="data-protection">Data Protection</h2>
<p>A lot of people like the idea of installing a plugin into a CMS to handle things such as contact forms, so people can contact you about something, but in all honesty, it’s easier just to have an email address on the page that users can click on and email you directly. The reason I say this is that you have to try and prevent spam emails by using some kind of captcha on the form, as well as maintaining an email service that will handle the form submission and either store the form data somewhere on your site or send it to you as an email. This is pretty basic stuff, but is further complicated by data privacy laws that dictate how you store customers data and how you protect it. I know a lot of small business users would prefer to not have the hassle of managing stored user data on their site.</p>

<h2 id="security">Security</h2>
<p>One last thing to consider is website security. There is always a chance that using a popular CMS will leave your site vulnerable as there are always security issues being identified. You need to constantly keep your site up to date and lock down the CMS login as secure as possible. With a static site, there is no login screen. The original content lives somewhere else and the compiled, generated html is all that needs to be uploaded to your website, minimising the risk. Any public facing website has some risk but anything you can do to minimise it is better for your website in the long run.</p>

<h2 id="what-will-you-use-on-your-next-project">What will you use on your next project?</h2>
<p>A static site may not be the first thing you consider when building your new website, but it’s definitely worth exploring the pros and cons before you start the next project. After all, a faster, more secure site is better for you and your visitors.</p>]]></content><author><name></name></author><category term="development" /><summary type="html"><![CDATA[There are many ways to make a website, but what about static site generators]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.csrhymes.com//img/static-site-generator.jpg" /><media:content medium="image" url="https://www.csrhymes.com//img/static-site-generator.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>