<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: LoadBalancing.xyz</title>
    <description>The latest articles on DEV Community by LoadBalancing.xyz (@loadbalancing).</description>
    <link>https://dev.to/loadbalancing</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F153935%2F66d7cdbb-33ee-4290-a97d-142465f6919e.png</url>
      <title>DEV Community: LoadBalancing.xyz</title>
      <link>https://dev.to/loadbalancing</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/loadbalancing"/>
    <language>en</language>
    <item>
      <title>Blogging with Hugo and GitLab (4): HTTPS with Let's Encrypt</title>
      <dc:creator>LoadBalancing.xyz</dc:creator>
      <pubDate>Sat, 04 May 2019 00:00:00 +0000</pubDate>
      <link>https://dev.to/loadbalancing/building-a-blog-website-4-https-with-let-s-encrypt-1j4f</link>
      <guid>https://dev.to/loadbalancing/building-a-blog-website-4-https-with-let-s-encrypt-1j4f</guid>
      <description>&lt;p&gt;The default HTTPS support by GitLab will be unavailable with custom domains. Fortunately, there is the solution to add HTTPS back for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why HTTPS?
&lt;/h2&gt;

&lt;p&gt;HTTPS (HTTP over TLS or HTTP over SSL) is more secure than HTTP. Today many browsers will mark a website as insecure if it's visited via HTTP instead of HTTPS. I think that's important for personal bloggers as you don't want people to think they are exposed to security risk by visiting your blog website.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Let's Encrypt?
&lt;/h2&gt;

&lt;p&gt;In order to equip your website with HTTPS, you need to acquire a SSL/TLS certificate from a certificate authority (CA) that is trusted by browsers. The good thing is that free certificates are available. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.cacert.org"&gt;CAcert&lt;/a&gt; is more in the Linux world while certificates issued by it are still not trusted by most browsers.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.cloudflare.com"&gt;Cloudflare&lt;/a&gt; (btw, they own an interesting domain &lt;em&gt;https:&lt;span&gt;&lt;/span&gt;//one.one.one.one&lt;/em&gt;) offers free certificates, but &lt;a href="https://nickjanetakis.com/blog/lets-encrypt-vs-cloudflare-for-https"&gt; it might not be really free&lt;/a&gt; if you go with full features.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://letsencrypt.org"&gt;Let's Encrypt&lt;/a&gt; provides full-feature free certificates which are valid for 90 days and renewable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, Let's Encrypt is the best.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;macOS Sierra 10.12.6.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Obtain a Let's Encrypt certificate
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Homebrew in macOS.&lt;br&gt;
/usr/bin/ruby -e "$(curl -fsSL &lt;a href="https://raw.githubusercontent.com/Homebrew/install/master/install)"&gt;https://raw.githubusercontent.com/Homebrew/install/master/install)&lt;/a&gt;"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install CertBot.&lt;br&gt;
brew install certbot&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Request a certificate. Though optional, it's recommended to provide an email to receive notifications (e.g., certificate expiration). Here we request the certificate for both root domain and sub-domain.&lt;br&gt;
sudo certbot certonly -a manual -d loadbalancing.xyz -d &lt;a href="http://www.loadbalancing.xyz"&gt;www.loadbalancing.xyz&lt;/a&gt; --email &lt;a href="mailto:example@email.com"&gt;example@email.com&lt;/a&gt;&lt;br&gt;
It's then followed by several steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type &lt;code&gt;A&lt;/code&gt; to agree with their terms of service.&lt;/li&gt;
&lt;li&gt;Type either &lt;code&gt;Y&lt;/code&gt; or &lt;code&gt;N&lt;/code&gt; depending on if you want to receive news from Let's Encrypt.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;Y&lt;/code&gt; to agree with logging your IP.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then pause here (don't press Enter). Follow the instruction to create a file containing the data specified and commit it to your repository.&lt;br&gt;
cd your_repository/static&lt;br&gt;
mkdir -p .well-known/acme-challenge/&lt;br&gt;
vi the_specified_file_name&lt;br&gt;
The file need to be available at:&lt;br&gt;
&lt;em&gt;http://&lt;span&gt;&lt;/span&gt;loadbalancing.xyz/.well-known/acme-challenge/the_specified_file_name&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now press Enter. It will generate and save the certificate and key to local. Record their content which will be used in the next step.&lt;br&gt;
sudo cat /etc/letsencrypt/live/loadbalancing.xyz/fullchain.pem&lt;br&gt;
sudo cat /etc/letsencrypt/live/loadbalancing.xyz/privkey.pem &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Add the certificate to GitLab
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Add the certificate and key to your website.&lt;br&gt;&lt;br&gt;
"Setting" &amp;gt; "Pages".&lt;br&gt;&lt;br&gt;
For each domain (root and sub-domain), click "Details" &amp;gt; "Edit".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy and paste the certificate into the first field &lt;code&gt;Certificate (PEM)&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy and paste the private key into the second field &lt;code&gt;Key (PEM)&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let traffics be automatically directed to HTTPS.&lt;br&gt;&lt;br&gt;
Select "Force HTTPS (requires valid certificates)".&lt;br&gt;&lt;br&gt;
Click "Save".  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After a few minutes, you will be able to visit your website via HTTPS. You may also want to update the base URL in &lt;code&gt;config.toml&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Renewal
&lt;/h2&gt;

&lt;p&gt;As mentioned earlier, Let's Encrypt certificates expire every 90 days and you will have to renew them periodically. To renew certificates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo certbot renew
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Alright, after two months I realized the above renewal just doesn't work. The following error is given:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Attempting to renew cert (loadbalancing.xyz) from /etc/letsencrypt/renewal/loadbalancing.xyz.conf produced an unexpected error: The manual plugin is not working; there may be problems with your existing configuration.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.'). Skipping."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Looks like the only way of renewal is to manually redo the whole procedure, which I don't think is gonna be sustainable. Fortunately, someone figured out a way of auto renewal with GitLab and I will update my experience of trying that in the next post.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>https</category>
      <category>letsencrypt</category>
    </item>
    <item>
      <title>Blogging with Hugo and GitLab (3): Custom Domains</title>
      <dc:creator>LoadBalancing.xyz</dc:creator>
      <pubDate>Sat, 06 Apr 2019 00:00:00 +0000</pubDate>
      <link>https://dev.to/loadbalancing/building-a-blog-website-3-register-a-custom-domain-from-namesilo-26lh</link>
      <guid>https://dev.to/loadbalancing/building-a-blog-website-3-register-a-custom-domain-from-namesilo-26lh</guid>
      <description>&lt;p&gt;Give your blog website a custom domain to make it more professional and/or more fun.&lt;/p&gt;

&lt;h2&gt;
  
  
  Top-level domain
&lt;/h2&gt;

&lt;p&gt;A &lt;a href="https://en.wikipedia.org/wiki/Top-level_domain"&gt; top-level domain (TLD)&lt;/a&gt; is the last label of a domain name, for example, "com" of "w&lt;span&gt;&lt;/span&gt;ww.example.com". For that same example, "example" is a second-level domain. With your blog website created and hosted in GitLab, it's associated with the second-level domain "gitlab.io" and can be visited at &lt;em&gt;https://&lt;span&gt;&lt;/span&gt;username.gitlab.io&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;There is a wide variety of top-level domains today. Besides the most known ones like ".com" and ".net", you have the choice of other new interesting domains for your style such as ".lol", ".cat" and ".nyc". Some domains look strange to me, for example, ".fail" and ".wtf", and I wonder how they can be used (that said, there is one good example I really like, &lt;a href="http://algorithms.wtf"&gt; Algorithms.wtf&lt;/a&gt;, by a professor in UIUC).&lt;/p&gt;

&lt;p&gt;Could top-level domains be free? &lt;a href="http://www.dot.tk"&gt; Yes&lt;/a&gt;, but you only have five options and you won't be able to own it (though you can use it). Domains can be affordable as long as it's not a premium/popular name. Often time you can get one with around ten bucks for a year. It may even have discount for the first year ended up with less than one buck. To begin with, you will need to choose a domain name registrar. Here &lt;a href="https://www.namesilo.com/?rid=e010b53fi"&gt;NameSilo&lt;/a&gt; is recommended.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why NameSilo?
&lt;/h3&gt;

&lt;p&gt;By looking around, I found NameSilo to be a domain name registrar with very good reputation (though its website looks old-fashioned). Its main advantage is the &lt;a href="https://www.namesilo.com/pricing.php?rid=e010b53fi"&gt; price&lt;/a&gt;--not only cheap, but also transparent. The price listed is what you pay (which may not be always true for other domain name registrars). For a new registration, there is the coupon &lt;code&gt;NamesiloOneDollar&lt;/code&gt; to get $1 discount. Note that NameSilo &lt;a href="https://www.namesilo.com/Support/Why-we-do-not-offer-SSL%2FTLS-certificates/?rid=e010b53fi"&gt; does not&lt;/a&gt; offer SSL/TLS certificates (which means your website can only be visited at &lt;em&gt;http://&lt;/em&gt; but not &lt;em&gt;https://&lt;/em&gt;). Fortunately, there are options that offer secure SSL/TLS for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Register a domain at NameSilo
&lt;/h2&gt;

&lt;p&gt;To register a domain:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://www.namesilo.com/register.php?rid=e010b53fi"&gt; NameSilo&lt;/a&gt; and search the name you would like to get.&lt;/li&gt;
&lt;li&gt;Select the top-level domain (e.g., .com) you prefer and click "REGISTER CHECKED DOMAINS".&lt;/li&gt;
&lt;li&gt;Set the configuration options as below:

&lt;ul&gt;
&lt;li&gt;"Service Link": None (default)&lt;/li&gt;
&lt;li&gt;"NameServers": (leave it)&lt;/li&gt;
&lt;li&gt;"Auto-Renew": No/Yes&lt;/li&gt;
&lt;li&gt;"Privacy Setting": WHOIS Privacy&lt;/li&gt;
&lt;li&gt;"Set all years to": 1/2/3/.../10
Note that for a domain with the first-year pricing promotion, the limit for registrations is 1 year. Upon registration, you will then be able to extend it for up to 10 years with the regular price. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Enter the coupon &lt;code&gt;NamesiloOneDollar&lt;/code&gt; and click "Submit" to apply.&lt;/li&gt;
&lt;li&gt;Click "CONTINUE --&amp;gt;" and choose the payment.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Link the domain with your website
&lt;/h2&gt;

&lt;p&gt;The rationale behind the linkage of a domain and your website is to rely on the &lt;a href="https://en.wikipedia.org/wiki/Domain_Name_System"&gt; Domain Name System (DNS)&lt;/a&gt; which maps the domain to the IP address where the website is served. Configuration is needed on both sides:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add the custom domain to GitLab.&lt;/li&gt;
&lt;li&gt;Add the DNS records to the domain name registrar (e.g., NameSilo) and direct them to GitLab.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Add a custom domain to GitLab
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Disable the forcing of HTTPS, since NameSilo does not provide SSL/TLS certificates.&lt;br&gt;
"Settings" &amp;gt; "Pages".&lt;br&gt;
Unselect "Force HTTPS (requires valid certificates)".&lt;br&gt;
Click "Save".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the root domain (e.g., loadbalancing.xyz).&lt;br&gt;
"Settings" &amp;gt; "Pages" &amp;gt; click "New Domain".&lt;br&gt;
"Domain": loadbalancing.xyz&lt;br&gt;
"Certificate (PEM)": (leave it blank)&lt;br&gt;
"Key (PEM)": (leave it blank)&lt;br&gt;
Click "Create New Domain".&lt;br&gt;
GitLab will then generate a DNS TXT record content (will be used later) like:&lt;br&gt;
_gitlab-pages-verification-code.loadbalancing.xyz TXT gitlab-pages-verification-code=...&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the sub-domain (e.g., w&lt;span&gt;&lt;/span&gt;ww.loadbalancing.xyz).&lt;br&gt;
"Settings" &amp;gt; "Pages" &amp;gt; click "New Domain".&lt;br&gt;
"Domain": w&lt;span&gt;&lt;/span&gt;ww.loadbalancing.xyz&lt;br&gt;
"Certificate (PEM)": (leave it blank)&lt;br&gt;
"Key (PEM)": (leave it blank)&lt;br&gt;
Click "Create New Domain".&lt;br&gt;
GitLab will then generate a DNS TXT record content (will be used later) like:&lt;br&gt;
_gitlab-pages-verification-code.w&lt;span&gt;&lt;/span&gt;ww.loadbalancing.xyz TXT gitlab-pages-verification-code=...&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Add DNS records to NameSilo
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the control panel of NameSilo.&lt;br&gt;
Click "domain manager".&lt;br&gt;
Click the domain you want to configure.&lt;br&gt;
Click "DNS Records: Update".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove all existing DNS A and CNAME records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For the root domain (e.g., loadbalancing.xyz):&lt;br&gt;
Create a new A-type record.&lt;br&gt;
"HOSTNAME": (leave it blank)&lt;br&gt;
"TYPE": A&lt;br&gt;
"ADDRESS / VALUE": 35.185.44.232 (GitLab's IP address)&lt;br&gt;
"DISTANCE/PRIO" : NA&lt;br&gt;
"TTL": 3603&lt;br&gt;
click "SUBMIT".&lt;br&gt;
Create a new TXT/SPF-type record.&lt;br&gt;
"HOSTNAME": _gitlab-pages-verification-code&lt;br&gt;
"TYPE": CNAME&lt;br&gt;
"ADDRESS / VALUE": gitlab-pages-verification-code=...&lt;br&gt;
"DISTANCE/PRIO" : NA&lt;br&gt;
"TTL": 3603&lt;br&gt;
click "SUBMIT".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For the sub-domain (e.g., w&lt;span&gt;&lt;/span&gt;ww.loadbalancing.xyz):&lt;br&gt;
Create a new CNAME-type record:&lt;br&gt;
"HOSTNAME": w&lt;span&gt;&lt;/span&gt;ww&lt;br&gt;
"TYPE": CNAME&lt;br&gt;
"ADDRESS / VALUE": username.gitlab.io&lt;br&gt;
"DISTANCE/PRIO" : NA&lt;br&gt;
"TTL": 3603&lt;br&gt;
click "SUBMIT".&lt;br&gt;
Create a new TXT/SPF-type record:&lt;br&gt;
"HOSTNAME": _gitlab-pages-verification-code.w&lt;span&gt;&lt;/span&gt;ww&lt;br&gt;
"TYPE": CNAME&lt;br&gt;
"ADDRESS / VALUE": gitlab-pages-verification-code=...&lt;br&gt;
"DISTANCE/PRIO" : NA&lt;br&gt;
"TTL": 3603&lt;br&gt;
click "SUBMIT".&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here we use different DNS records for the root domain and sub-domain (DNS A record and DNS CNAME record respectively). The DNS TXT records are required by GitLab to verify the domain's ownership. &lt;/p&gt;

&lt;p&gt;After a couple of minutes, you will be able to visit your website from the new domain.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Blogging with Hugo and GitLab (2): Local Development Setup</title>
      <dc:creator>LoadBalancing.xyz</dc:creator>
      <pubDate>Sun, 24 Mar 2019 00:00:00 +0000</pubDate>
      <link>https://dev.to/loadbalancing/building-a-blog-website-2-local-hugo-development-setup-ifl</link>
      <guid>https://dev.to/loadbalancing/building-a-blog-website-2-local-hugo-development-setup-ifl</guid>
      <description>&lt;p&gt;While you can edit pages online in GitLab (e.g., through Web IDE, which also allows to preview Markdown pages), a local development environment of Hugo provides the best support of "what you see is what you get".&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;macOS Sierra 10.12.6.&lt;/li&gt;
&lt;li&gt;Hugo v0.54.0.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Create a local repository
&lt;/h2&gt;

&lt;p&gt;With the website repository hosted on GitLab, we can clone the repository to local.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone your website repository to local.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://gitlab.com/username/username.gitlab.io.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Configure your GitLab account email within the local repository, which will be used as the identification for all change commit.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config user.email "example@email.com"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The updated account information can be verified in &lt;code&gt;.git/config&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[user]                                                                           
email = example@email.com
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Install Hugo to local
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Install Homebrew in macOS.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install Hugo.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install hugo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Verify the installation by viewing the Hugo version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hugo version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Start the Hugo server
&lt;/h2&gt;

&lt;p&gt;Start the Hugo server with "drafts" enabled, which will show all pages including drafts on the local server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hugo server -D
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now you will be able to view your website locally at: &lt;em&gt;http://&lt;span&gt;&lt;/span&gt;localhost:1313&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The Hugo server will keep running until you press Ctrl+C to stop it. Any saved changes will be immediately reloaded.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Blogging with Hugo and GitLab (1): Quick Start</title>
      <dc:creator>LoadBalancing.xyz</dc:creator>
      <pubDate>Sat, 23 Mar 2019 00:00:00 +0000</pubDate>
      <link>https://dev.to/loadbalancing/building-a-blog-website-1-quick-start-with-hugo-and-gitlab-16cl</link>
      <guid>https://dev.to/loadbalancing/building-a-blog-website-1-quick-start-with-hugo-and-gitlab-16cl</guid>
      <description>&lt;p&gt;Building your own blog website is easy today. With only a few steps, you will be able to create your own blog website which can be visited at &lt;em&gt;https://&lt;span&gt;&lt;/span&gt;username.gitlab.io&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Hugo?
&lt;/h2&gt;

&lt;p&gt;If your goal is to build a static website (which is good enough for personal blogs), there are several solutions today to help make such process easy and automatic. Basically what you need to do is to write some &lt;a href="https://en.wikipedia.org/wiki/Markdown"&gt; Markdown&lt;/a&gt; docs and they will help you convert them into static HTML files. Among those options, &lt;a href="https://gohugo.io"&gt; Hugo&lt;/a&gt; is known to be the fastest one in terms of static page building, since it's written in Go with compilation while the others are based on interpretation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why GitLab?
&lt;/h2&gt;

&lt;p&gt;GitLab offers free service of &lt;a href="https://about.gitlab.com/product/pages/"&gt; GitLab Pages&lt;/a&gt; for hosting static websites. The GitLab Pages service also provides native support for Hugo, which makes it extremely easy and convenient to build and deploy your webiste without replying on any other third-party supports.&lt;/p&gt;

&lt;p&gt;If you are convinced, the first step is to create an account in GitLab. Note that your username in GitLab will be the sub-domain name of your website's URL such as &lt;em&gt;https://&lt;span&gt;&lt;/span&gt;username.gitlab.io&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create your website repository
&lt;/h2&gt;

&lt;p&gt;Since our goal is Hugo+GitLab, the easiest way is to fork the official Hugo repository in GitLab.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://gitlab.com/pages/hugo"&gt; Hugo's repository on GitLab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Login with your GitLab account.&lt;/li&gt;
&lt;li&gt;Fork this repository.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Some further configuration:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Remove the forking relationship, which won't be necessary unless you want to contribute back to the upstream project.&lt;br&gt;
"Settings" &amp;gt; "General" &amp;gt; "Advanced" &amp;gt; click "Expand"&lt;br&gt;
Click "Remove fork relationship".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rename the repository, so it will be linked to your website's URL &lt;em&gt;https://&lt;span&gt;&lt;/span&gt;username.gitlab.io&lt;/em&gt;.&lt;br&gt;
"Settings" &amp;gt; "General" &amp;gt; "Advanced" &amp;gt; click "Expand" &amp;gt; "Rename repository"&lt;br&gt;
"Project name": &lt;em&gt;username.gitlab.io&lt;/em&gt;&lt;br&gt;
"Path": &lt;em&gt;username.gitlab.io&lt;/em&gt;&lt;br&gt;
Click "Rename project".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mark your repository as private--if you only want people to visit your website through the URL, but not be able to view your repository.&lt;br&gt;
"Settings" &amp;gt; "General" &amp;gt; "Visibility, project features, permissions" &amp;gt; click&lt;br&gt;
"Expand"&lt;br&gt;
"Project visibility": Private&lt;br&gt;
click "Save changes".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update the base URL in &lt;code&gt;config.toml&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;diff --git a/config.toml b/config.toml
--- a/config.toml
+++ b/config.toml
@@ -1,4 +1,4 @@
-baseurl = "https://pages.gitlab.io/hugo/"
+baseurl = "https://username.gitlab.io"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After a couple of minutes, you will be able to visit your website at &lt;em&gt;https://&lt;span&gt;&lt;/span&gt;username.gitlab.io&lt;/em&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
