Hexo Theme Aurora

Are you tired of your terminal looking like a boring old black screen?

To kick things off, what Hexo is and why it’s awesome. Hexo is a static site generator that allows you to create beautiful blogs or websites using Markdown files. It also has an amazing theme called Aurora that will make your terminal look like something out of Tron.

To install Hexo and the Aurora theme, follow these simple steps:

1. Install Node.js on your Linux machine (if you haven’t already). You can download it from their website or use your package manager to do so.

2. Once Node.js is installed, open up a terminal window and run this command:

# This script installs Hexo and the Aurora theme on a Linux machine.

# Install Node.js if it is not already installed.
# You can download it from their website or use your package manager to do so.
sudo apt-get install nodejs -y

# Install Hexo CLI using apt-get.
# The -y flag automatically answers yes to any prompts during installation.
sudo apt-get install hexo-cli -y

3. This will install the Hexo CLI (command line interface) on your system. Now let’s create a new blog using Aurora as our theme. Run this command:

# This script installs the Hexo CLI and creates a new blog using the Aurora theme.

# Initializes a new Hexo blog named "myblog"
hexo init myblog

# Changes directory to the newly created blog folder
cd myblog

# Installs the Aurora theme for the blog
npm install hexo-theme-aurora

# Opens the blog's configuration file in a text editor
nano _config.yml

# Adds the Aurora theme to the blog's configuration
# This allows the blog to use the Aurora theme
theme: hexo-theme-aurora

# Starts the Hexo server to preview the blog
hexo server

# Opens the blog in a web browser
# This allows the user to see the blog's layout and design
# before publishing it
open http://localhost:4000/

4. Change into the newly created directory by running:

# This script changes the current directory to "myblog"

# Change directory to "myblog"
cd myblog

5. Install the Aurora theme using npm (Node Package Manager):

# This script installs the Aurora theme using npm (Node Package Manager)

# The following line installs the hexo-theme-aurora package and saves it as a dependency in the package.json file
npm install hexo-theme-aurora --save

# The script is now complete.

6. Run Hexo to generate your site:

# This script is used to generate a Hexo site.

# The following line executes the "hexo g" command, which generates the site.
hexo g

7. Start the server and preview your new blog using Aurora:

# This script starts the server and previews the new blog using Aurora.

# The following line uses the hexo command to start the server.
hexo server

# The server will now be running and the new blog can be previewed using Aurora.

8. Open up a web browser and navigate to http://localhost:4000 to see your beautiful new site!

Now how to customize the theme to make it truly unique. First, open up the `_config.yml` file in your blog directory using any text editor of your choice (we recommend nano or vim). This is where you can change various settings like site title, description, and author name.

To add a custom logo to Aurora, create an image named `source/images/logo.png` with the desired dimensions and upload it to that directory using your favorite file transfer method (FTP or SCP). Then open up the `_config.yml` file again and add this line:

# Add custom logo to Aurora theme
# Create an image named `source/images/logo.png` with desired dimensions and upload to that directory using FTP or SCP
# Open `_config.yml` file and add this line:

# Set logo image path
logo: /images/logo.png # This line sets the path for the logo image to be used in the theme

# Site title, description, and author name
title: My Website # This line sets the title of the website
description: This is my website # This line sets the description of the website
author: John Doe # This line sets the author name for the website

To change the color scheme, you can modify the following lines in the same configuration file:

# This script is used to change the color scheme of a configuration file.

# The theme option is set to "aurora" to use the Aurora theme.
theme: aurora

# The following lines are used to configure the Aurora theme.
aurora_theme_config:
  # The primary color is set to "#FF5733" to change the main color of the theme.
  primaryColor: '#FF5733'
  # The secondary color is set to "#00CED1" to change the secondary color of the theme.
  secondaryColor: '#00CED1'
  # The accent color is set to "#F44336" to change the accent color of the theme.
  accentColor: '#F44336'
  # The background color is set to "#2E3A46" to change the background color of the theme.
  backgroundColor: '#2E3A46'
  # The text color is set to "#FFFFFF" to change the text color of the theme.
  textColor: '#FFFFFF'

These options allow you to customize the primary, secondary, and accent colors as well as the background color and text color.

And that’s it! You now have a beautiful new blog with Aurora theme running on your Linux machine. To make it even cooler, let’s add some custom fonts using Powerline or Nerd Fonts (which we mentioned earlier).

To install the Powerline fonts, run this command:

# Install the Powerline fonts package using apt-get
sudo apt-get install fonts-powerline

# Check if the installation was successful
if [ $? -eq 0 ]; then # Use conditional statement to check the exit status of the previous command
    echo "Powerline fonts successfully installed!" # Print a success message if the exit status is 0
else
    echo "Error installing Powerline fonts. Please try again." # Print an error message if the exit status is not 0
fi

Then select your preferred font in the text tab of your terminal preferences. For Nerd Fonts, follow these steps:

1. Download and extract the font files from their website (https://www.nerdfonts.com/). 2. Copy the extracted folder to `~/.local/share/fonts` or wherever you prefer to store your custom fonts. 3. Run this command in a terminal window:

# This script updates the font cache to include any newly added fonts.

# The following line uses the `fc-cache` command to update the font cache.
fc-cache -fv # `-f` flag forces the update and `-v` flag provides verbose output.

# The font cache is a database that stores information about available fonts on the system.

# The `-f` flag forces the update, ensuring that any newly added fonts are included in the cache.

# The `-v` flag provides verbose output, displaying the progress and any errors that may occur during the update.

This will update the font cache and allow you to use your new Nerd Fonts immediately! And that’s it, You now have a beautiful blog with Aurora theme running on Linux using custom fonts. We hope this tutorial was helpful for you and we encourage you to share your own tips and tricks in the comments below.

SICORPS