<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Blog on Bastien Traverse</title>
    <link>https://bastientraverse.com/en/tags/blog/</link>
    <description>Recent content in Blog on Bastien Traverse</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 26 Apr 2021 00:00:00 +0200</lastBuildDate><atom:link href="https://bastientraverse.com/en/tags/blog/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hugo on Vercel</title>
      <link>https://bastientraverse.com/en/posts/2021-04/hugo-vercel/</link>
      <pubDate>Mon, 26 Apr 2021 00:00:00 +0200</pubDate>
      
      <guid>https://bastientraverse.com/en/posts/2021-04/hugo-vercel/</guid>
      <description>&lt;p&gt;As an attempt to diversify, I have been using &lt;a href=&#34;https://vercel.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Vercel&lt;/a&gt; to build and host this website since its inception, as opposed to going with the more common choice of &lt;a href=&#34;https://www.netlify.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Netlify&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After being pleasantly surprised with the initial setup-and-first-build flow (the automatic HTTPS on custom domains is awesome), I stumbled upon something that baffled me: &lt;strong&gt;the default Hugo version Vercel uses to build your site dates from September 2019&lt;/strong&gt;, and you have to jump through hoops to find out about it.&lt;/p&gt;
&lt;h2 id=&#34;getting-the-version-of-hugo-used-to-build-your-site&#34;&gt;&lt;a href=&#34;#getting-the-version-of-hugo-used-to-build-your-site&#34; class=&#34;headerlink anchor&#34;&gt;&lt;i class=&#34;iconfont icon-link&#34;&gt;&lt;/i&gt;&lt;/a&gt;Getting the version of Hugo used to build your site&lt;/h2&gt;&lt;p&gt;This came out due to the many discrepancies I was seeing between my local dev version (using the latest and shiniest &lt;code&gt;v0.82.1&lt;/code&gt;) and the deployed site. It took me a couple of weeks before I realized that Vercel was not using the latest stable version as I was naïvely thinking, but was in fact using version&amp;hellip; &lt;code&gt;0.58.2&lt;/code&gt; from &lt;strong&gt;2019-09-13&lt;/strong&gt;!! 😨&lt;/p&gt;
&lt;p&gt;In order to get this basic information, you need to &lt;a href=&#34;https://github.com/vercel/vercel/discussions/5834#discussioncomment-362986&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;change the build command&lt;/a&gt; to something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hugo version &amp;amp;&amp;amp; hugo -D --gc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;rsquo;d hope Vercel would make this the default build command, as this undocumented&lt;sup&gt;[&lt;a href=&#34;https://vercel.com/guides/deploying-hugo-with-vercel?query=hugo#optional:-define-a-hugo-version&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;1&lt;/a&gt;][&lt;a href=&#34;https://vercel.com/docs/build-step#framework-versioning&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;2&lt;/a&gt;]&lt;/sup&gt; peculiarity made my first blog-and-deploy experience far more annoying than it ought to be.&lt;/p&gt;
&lt;p&gt;I really don&amp;rsquo;t understand why they&amp;rsquo;d use such an outdated version, without even so much as a warning. Quite some things happened in Hugo-land since the somewhat &amp;ldquo;dramatic&amp;rdquo; &lt;a href=&#34;https://gohugo.io/news/0.60.0-relnotes/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;changes in v0.60&lt;/a&gt;, which may have prompted this version pinning.&lt;/p&gt;
&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Tip&lt;/p&gt;
  If someone at Vercel reads this, please either use the latest version by default or include the one you are using in your Docs and offer a way to specify a &amp;ldquo;latest&amp;rdquo; as the &lt;code&gt;HUGO_VERSION&lt;/code&gt; environment variable.
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Blogging from a smartphone for tech-savvy people</title>
      <link>https://bastientraverse.com/en/posts/2020-01/smartphone-blogging/</link>
      <pubDate>Tue, 21 Jan 2020 00:00:00 +0100</pubDate>
      
      <guid>https://bastientraverse.com/en/posts/2020-01/smartphone-blogging/</guid>
      <description>&lt;p&gt;In this post we will see how to create and publish a blog using a smartphone, all the while flexing some serious tech chops.&lt;/p&gt;
&lt;h2 id=&#34;requirements&#34;&gt;&lt;a href=&#34;#requirements&#34; class=&#34;headerlink anchor&#34;&gt;&lt;i class=&#34;iconfont icon-link&#34;&gt;&lt;/i&gt;&lt;/a&gt;Requirements:&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;a smartphone running Android&lt;/li&gt;
&lt;li&gt;the &lt;a href=&#34;https://termux.com&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Termux&lt;/a&gt; app with &lt;code&gt;git&lt;/code&gt; and &lt;code&gt;hugo&lt;/code&gt; installed (&lt;code&gt;pkg install git hugo&lt;/code&gt;) and properly &lt;a href=&#34;https://wiki.termux.com/wiki/Termux-setup-storage&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;configured&lt;/a&gt; to access the &lt;a href=&#34;https://wiki.termux.com/wiki/Internal_and_external_storage&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;local storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;a &lt;a href=&#34;https://play.google.com/store/search?q=git%20client&amp;amp;c=apps&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;git client&lt;/a&gt; (Play store link) like the older but quite functional &lt;a href=&#34;https://play.google.com/store/apps/details?id=ch.phcoder.jigit&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Forker&lt;/a&gt; app for easy graphical interactions with git (commit, push&amp;hellip;): especially useful on the long run for a smoother publishing experience, but you may also exclusively use the command line for increased hacker-cred&lt;/li&gt;
&lt;li&gt;a text editor: I strongly recommend &lt;a href=&#34;https://mixplorer.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;MiXplorer&lt;/a&gt; (free on &lt;a href=&#34;https://labs.xda-developers.com/store/app/com.mixplorer&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;XDA Labs&lt;/a&gt; or support version in the Play Store), which provides editors suitable for both code and text and is an amazing file explorer all around; &lt;a href=&#34;https://gsantner.net/project/markor.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Markor&lt;/a&gt; is a good second choice&lt;/li&gt;
&lt;li&gt;accounts on compatible git hosting and CDN deployment services (I&amp;rsquo;ll be using &lt;a href=&#34;https://about.gitlab.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;GitLab&lt;/a&gt; and &lt;a href=&#34;https://vercel.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Vercel&lt;/a&gt;): although the CDN part is optional, it provides some nice benefits and a smoother experience overall than e.g. GitHub/GitLab Pages&lt;/li&gt;
&lt;li&gt;a mobile browser (I recommend &lt;a href=&#34;https://play.google.com/store/apps/details?id=org.mozilla.firefox&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Firefox for Android&lt;/a&gt;) and of course&amp;hellip; Internet access 😁&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;instructions&#34;&gt;&lt;a href=&#34;#instructions&#34; class=&#34;headerlink anchor&#34;&gt;&lt;i class=&#34;iconfont icon-link&#34;&gt;&lt;/i&gt;&lt;/a&gt;Instructions:&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;create a new empty project on GitLab and clone it in Termux/Forker (&lt;strong&gt;tip:&lt;/strong&gt; use the HTTPS URL in Termux to avoid having to install and setup openssh)&lt;/li&gt;
&lt;li&gt;in Termux, &lt;code&gt;cd&lt;/code&gt; to the repo folder (&lt;code&gt;~/storage/shared/Android/data/ch.phcoder.jigit/files/repo/*name*&lt;/code&gt; if using Forker) and run &lt;code&gt;hugo create site . -f&lt;/code&gt; in it&lt;/li&gt;
&lt;li&gt;follow &lt;a href=&#34;https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Hugo Quick Start Guide&lt;/a&gt; to add a theme and some content to your site&lt;/li&gt;
&lt;li&gt;check that everything is working as intended by running &lt;code&gt;hugo server -D&lt;/code&gt; and opening &lt;a href=&#34;http://localhost:1313&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;http://localhost:1313&lt;/a&gt; in your browser&lt;/li&gt;
&lt;li&gt;then commit and push your site to GitLab through Termux/Forker&lt;/li&gt;
&lt;li&gt;now follow the official Vercel guide for &lt;a href=&#34;https://vercel.com/guides/deploying-hugo-with-vercel#step-2:-deploy-your-hugo-website-with-vercel&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;deploying a Hugo site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;finally, enjoy your new blog created on your smartphone and available worldwide! 👍&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;going-further&#34;&gt;&lt;a href=&#34;#going-further&#34; class=&#34;headerlink anchor&#34;&gt;&lt;i class=&#34;iconfont icon-link&#34;&gt;&lt;/i&gt;&lt;/a&gt;Going further:&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gohugo.io/getting-started/configuration/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;customize your site&lt;/a&gt; to suit your needs&lt;/li&gt;
&lt;li&gt;set up a &lt;a href=&#34;https://vercel.com/docs/custom-domains&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;custom domain&lt;/a&gt; and enjoy the automatic HTTPS (really smoothly done by Vercel) to be a good netizen&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now whenever you want to add some content to your blog, just create a new post in the proper folder either using &lt;code&gt;hugo new posts/post_title&lt;/code&gt; in Termux or directly via your text editor, commit and push your changes and your updated site will be automagically deployed. You are officially equipped to blog on the go while roaming the vast world! Great success✌&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
