Tuesday, August 27, 2019

Jekyll Complains "GitHub Metadata: No GitHub API authentication could be found."

When building a Jekyll site, I encountered the following error message,


$ bundle exec jekyll build
Configuration file: _config.yml
            Source: foosite/
       Destination: _site
 Incremental build: disabled. Enable with --incremental
      Generating...
   GitHub Metadata: No GitHub API authentication could be found. 
   Some fields may be missing or have incorrect data.


The sources of this error are many. What caused the error in my case? It is actually the combination of the two facts:

  1. I used the Jekyll SEO Tags plugin, and
  2. I did not include a description value in the _config.yml file. 

After my adding a description map to the _config.yml file, the problem went away, e.g.,

$ cat _config.yml
...
description: this is my awesome site. 
...

Tuesday, August 20, 2019

Dealing with Data Degradation or Bit Rots

If you have set up a NAS or alike, such as a FreeNAS system, you know that the system periodically "scrubs" the disks. The disk scrubs are to to wipe clean the disks, instead, they are to prevent bit rots, a slow degradation of data store on storage devices, e.g., a magnetic disk's gradual loosing its magnetic charge.

If you don't have a NAS that does it for you, how do you reduce the chance of loosing the data due to bit rots (or data degradation), in particular, you have lots of important data on external hard drives? There are a number of tools that can help us if you don't wish to take the task into your own hand to program one. This post bookmarks three such tools,

  1. CSHATAG
  2. ExactFile
  3. DiskFresh 
A combination of application number 3 and one of applications number 1 and 2 in the above can give us a piece of mind, i.e., to detect bit rots and to prevent bit rots.

Monday, August 12, 2019

Moon, Saturn, and Jupiter at Night Sky

Stepping out at this Friday night, I happened to see a few bright astronomical bodies in the night sky.  A striking view was that Saturn, Moon, and Jupiter were lined up in an almost straight line. Can you spot the two planets and the Moon in this low-quality cellphone photo?


It also happened that above my head were two bright stars, Altair and Vega that were supposedly separated by the Milky Way -- I say "supposedly" because the Milky Way wasn't visible at all in this light-polluted city park. In both western and eastern folklore and cultures, these two have had interesting histories and stories that often inspire romances. In Chinese folklore, Altair and Vega are a couple whose love are banished. Against all odds, Altair and two nearby but much darker stars β-Aquilae and γ-Aquilae at one side of the river, i.e., the Milky way are meeting his wife and the children's mother, the Weaving girl, Vega at the other side of the river. I wish I had had taken a photo of these beloved stars.

Wednesday, August 7, 2019

Installing Jekyll on Windows 10 with Windows Subsystem for Linux

Following the Jekyll document, I installed Jekyll on Windows 10 with Windows System for Linux. The steps were as follows:

  1. Enable Windows Subsystem for Linux following Microsoft's documentation, i.e., 
    1. In Windows 10, open PowerShell as Administrator.
    2. Run the following in PowerShell

      Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
      

    3. Restart Windows
  2. Download and install a Linux distribution from Microsoft Store by opening the following URL in a Web browser: https://aka.ms/wslstore
  3.  Open a Windows Command Prompt window, and run

    bash
    

  4. Run the following in bash
    
    sudo apt-get update -y && sudo apt-get upgrade -y
    sudo apt-get install -y --no-install-recommends software-properties-common gnupg gpg-agent dirmngr 
    sudo apt-add-repository ppa:brightbox/ruby-ng
    sudo apt-get update
    sudo apt-get install -y ruby2.5 ruby2.5-dev build-essential dh-autoreconf zlib1g-dev
    sudo apt-get install bundler
    sudo gem update
    

  5. Assume you have a Jeykll site at the www directory. Then go to the directory in bash
    
    cd www
    

  6. In bash, run the following
    
    cd www
    bundle update
    bundle install
    
  7. Build the site and launch the Web serer for testing.
    
    bundle exec jekyll serve --host=0.0.0.0 --incremental