Working on multiple branches at once Git worktree enables you to have multiple working directories linked to the same repository. Each directory can have its own branch checked out. And you can edit the code for each feature without changing or stashing the changes you did on each branch.
Worktree creation The following command will create a new directory, debug with branch1 checked out.
You can browse the ../debug directory and change the code as per your development for branch1.
Create a new file at layouts/_default/rss.xml. You can define your rss.xml as per your liking.
By default rss.xml only displays the summary of your articles. But I want to display the whole content. This helps me in syncing my posts with my dev.to site.
You can find the Hugo’s default rss.xml at Hugo’s Github repo. Let’s copy the contents to our rss.xml file that we just created.
Then change the description to show content instead of summary as follows.
Partials and code reusability Hugo provides a nice mechanism to separate your components and stitch them at different places. This means you can design your components like nav-bar or menu bar and stitch them in all of your layouts. Earlier, we wrote some code to load tailwind in our index page. But we do not want to write this boilerplate code for all our pages. Instead we should have defined the tailwind loader code in a component and call it from all the layouts.
Expectations from this post With the version 0.128.0, Hugo started supporting Tailwind internally. In this post, let’s configure Tailwind and display some text in red.
Tailwind and other supporting apps We will install the below 4 packages.
tailwindcss - This is the core Tailwind library and is required for using tailwind tailwind/cli - This is a CLI tool for Tailwind that helps in building tailwind styles postcss - This is a library to process CSS with JavaScript plugins.
There is a bad news for Ubuntu (or any Debian based OS) user if you have installed Hugo using apt. The official apt repository is not being updated continuously.
Today, I wanted to experiment with the Tailwind support introduced in Hugo 0.128.0. But the apt package manager does not has this version. The latest version is 0.92.2 as of now.
apt list -a hugo : Listing... : hugo/jammy-updates,jammy-security,now 0.92.2-1ubuntu0.1 amd64 [installed] : hugo/jammy 0.
What we did and what we will do? Previously, we were successfully able to render our home, single and list pages. When we started templating, we looked into a term called, context. We worked with site context and page context and I assumed they are just like references. This post is meant to explore more on context and get a deeper understanding.
Context The Context is the object available to you at anytime.
What we did and what we will do? This is a part blog in which I am documenting my learning process of creating my own theme in Hugo. Previously, we went through the basic flow of creating a theme. My current theme is poison theme and we replaced the theme with our new theme which we named, “awesometheme”. But unfortunately, after applying the new theme, the rendered page was blank.
Hugo is all about themes Hugo is a developers dream of static sites. Whether you are planning on a new blog site or maybe a documentation for a product, you can easily launch a static site using Hugo.
The most powerful feature of Hugo is its simplicity. It is designed to separate your content from styling. This means you can write your content in normal markdown files independent of all the website pages and layouts.
What is Julia? Julia is a scientific programming language. It is close to R and Python in syntax and scripting feel. But it is more like a light weight MATLAB.
I was going with Gilbert Strang’s lectures on Linear Algebra and as always, you can’t learn if you are not experimenting. I searched for any language support for MATLAB in Doom Emacs. Instead I saw this - ;;julia ; a better, faster MATLAB.
What is it? The object pool design pattern exposes a manager to manage a pool of reusable objects. The idea is to keep a know number of reusable objects (with a hard limit to initialize some more lazily). Whenever someone need the object from the pool, it will ask the pool manager. If there are free objects, the manager will engage one for your. If there aren’t any free objects but the hard limit is not breached, then the manager will initialize a new object and provide you.