Skip to content

lbarqueira/lbarqueira.github.io

Repository files navigation

my-blog

Features:

  • favicon - DONE!
  • google analytics - DONE!
  • SEO - DONE!
  • turn into a PWA - DONE! - TO BE IMPROVED IN FUTURE WITH WORKBOX

Acknowledgements:

Tag Generator - Python

Jekyll Site/Repo for reference

Note: UA (Universal Analytics) was configured instead of G- see Configure o Analytics para um Website (Universal Analytics)

I used https://looka.com/ for LOGO design.

SEO

Turn website into PWA

Working without Workbox ... In this approach I have specifically to say what are the routes that I want to cache for offline support.

"service-worker_reference.txt" - for reference: Como transformar um site no github pages feito com jekyll em uma pwa

"service-worker.js" - active for now, with offline page: Adding a service worker to Jekyll

Manually managing the cache storage via your Service Worker script can be a tedious task. The number of files and their names may change, so hard-coding them does not seem like a good idea. That’s where Workbox comes in.

TODO: Another tutorial, but using Workbox

Jekyll website to progressive web app

Note: For now if you Lighthouse audit the site, PWA is checked.

Important site to know more about PWA and ServiceWorker cache: PWAdvent.dev https://pwadvent.dev/day/5/

Change to a regular theme instead of a Gem-based theme

With this change I now have all the freedom to make changes to my blog.

Up and Running with GitHub Pages, Part 4, Jekyll Themes

Important command for copying files from minima gem: xdg-open $(bundle info --path minima)

After 1 year without updating my blog, what did I do?

It is important to note that in the meantime I changed computers with new operating system fedora.

I followed the site Web Application.

Installation (because it is a new laptop)
$ sudo dnf install ruby-devel
$ gem install jekyll
Usage (with my blog previously created)
$ jekyll new my-site // not needed since previously created
$ cd myblog // Alternativelly you can open vscode project myblog
$ jekyll serve // Alternativelly you can run this code on vscode terminal

After writing a post (copy past from a previous one) never forget to run the following script of code for the tags:

python tag_generator.py

Then, since the blog is a PWA, I have to edit the file service-worker.js, namelly:

const offlineCache = 'offline-2025-01-06-5-50'; // The cache key, you can override this to manually clear the cache

Now, I have to Manual Deploy. The blog is hosted in GitHub Pages then I have to run the following command in terminal:

jekyll build

Now, I am able to commit and push to github (using vscode), then I wait a little to see it on-line at:

LB Blog

Add a new social media link - Bluesky (in my case)

VERY IMPORTANT !!!

Command Line Usage

One command example in terminal:

[barqueira@fedora myblog]$ jekyll doctor

Your test results are in. Everything looks fine.