This page tells you how to get started with Hugo Cosmos, including installation and basic configuration.

Install requirements

Hugo Cosmos requires an extended hugo version to process SCSS to CSS1. You can install hugo on your local machine for local builds and previews of sites that use Hugo Cosmos.

Using the theme

To prepare your new site environment just a few steps are required:

  1. Create a new empty Hugo site.

    1
    
    hugo new site demosite
    
  2. Switch to the root of the new site and make the initial commit.

    1
    2
    3
    4
    
    cd demosite
    git init
    git add archetypes/ content/ config.toml
    git commit -m "Initial commit"
    
  3. Install the Cosmos theme from a release bundle (recommended) or from Git branch.

    1
    2
    
    git submodule add https://github.com/librabyte/hugo-theme-cosmos.git themes/cosmos
    git submodule init themes/cosmos
    
  4. Create the minimal required Hugo configuration config.toml. For all configuration options take a look at the configuration page.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    
    title = "Hugo Cosmos"
    theme = "cosmos"
    
    # Required if you want to render robots.txt template
    enableRobotsTXT = true
    
    [markup]
      [markup.goldmark.renderer]
        unsafe = true
      [markup.tableOfContents]
        startLevel = 1
        endLevel = 9
    
  5. Write your first posts under your demo site.

    1
    
    hugo new posts/hello-world.md
    
  6. Test your site.

    1
    
    hugo server -D
    
  7. Update hugo theme to the latest version.

    1
    
    git submodule udpate
    

Markdown your thoughts

You can write your thoughts using any text editors as you like. All you need to do is to spend few minutes to learn Markdown Syntax which is simple enough.

Hugo Cosmos recommends some stands out of them:

  • Typora: An excellent markdown editor/render with seamless live preview.
  • Visual Studio Code: A lightweight but powerful source code editor, open source, fantastic plugins and even more.
  • Obsidian: A powerful and extensible knowledge base that works on top of your local folder of plain text files.
  • Other great tools you might recommend to us!

Deployments

Because Hugo renders static websites, you can host your new Hugo website virtually anywhere. Hugo community provides lots of popular hosting and automated deployment solutions2.

Netlify

There are several ways to deploy your site with this theme on Netlify3. Regardless of which solution you choose, the main goal is to ensure that the prebuilt theme release tarball is used or to run the required commands to prepare the theme assets before running the Hugo build command.

Here4 is an example to deploy your hugo sites to Netlify via Github Actions.

Known Limitations

You can report bugs or issues that beyond you expectations here.