Introduction theme for Hugo
Find a file
2020-10-11 22:11:17 -04:00
.github/workflows Add postcss dependency to workflow 2020-10-11 22:11:17 -04:00
archetypes Removed trailing spaces and missing newline at EOF (#170) 2019-08-14 14:40:10 +02:00
assets Update jQuery from 3.3.1 to 3.5.1 (#243) 2020-08-29 13:56:34 -04:00
docs Update README and docs 2019-10-01 10:26:30 -04:00
exampleSite Add demo taxonomy to example post 2020-10-11 19:47:53 -04:00
i18n Create sv.toml (#222) 2020-07-09 20:11:57 -04:00
images Do not use mockups as screenshot 2020-05-17 08:16:13 -04:00
layouts Individual taxonomies now display properly as links and the urls are routed correctly to the proper taxonomy term. 2020-10-03 18:43:48 -04:00
scripts Removed trailing spaces and missing newline at EOF (#170) 2019-08-14 14:40:10 +02:00
static #229 cleanup and update bulma (#231) 2020-08-05 21:34:59 -04:00
.gitattributes Hide docs/ in diff 2018-11-12 09:33:01 +01:00
.gitignore Removed trailing spaces and missing newline at EOF (#170) 2019-08-14 14:40:10 +02:00
CONTRIBUTING.md Add CONTRIBUTING, pin autoprefixer 2020-09-19 15:43:24 -04:00
LICENSE Update years 2019-10-01 10:18:25 -04:00
netlify.toml Removed trailing spaces and missing newline at EOF (#170) 2019-08-14 14:40:10 +02:00
README.md Allow for Custom JavaScript files (#233) 2020-08-08 10:52:35 -04:00
theme.toml Update Victoria's username 2019-07-24 19:51:35 -04:00

Introduction theme for Hugo

Netlify Status Test Hugo versions Latest Release

Introduction is a minimalist, highly-versatile theme for Hugo. It can be configured as a single page, or as a full-featured site with multiple sections. It is multilingual, responsive, and includes a light and dark theme.

Device mockups

Features:

  • Multilingual - supports side-by-side content in different language versions
  • Custom index page sections from Markdown files
  • Projects and Blog sections
  • Page load fade-in CSS effect and smooth scrolling to anchor links
  • Straightforward customization via config.toml
  • Styled Markdown throughout, including post titles
  • Syntax highlighting

Developer-friendly:

  • Sass files included with instant compiling to CSS thanks to Hugo Pipes and PostCSS
  • Thoughtful use of Sass variables makes creating new colour schemes easy

Getting started

  • Requires extended version of Hugo (latest version recommended)

To make changes to the theme CSS, extended Hugo's PostCSS requires JavaScript packages to compile the styles. You can install them using npm:

Learn how to install and use npm here.

Note: If you are using Hugo as a snap app, the above two Node.js packages have to be installed locally inside exampleSite.

cd exampleSite/
npm install postcss-cli
npm install autoprefixer

If you see an error message like:

Error: Error building site: POSTCSS: failed to transform "css/main.css" (text/css): resource "sass/sass/style..." not found in file cache

You may need to install these dependencies globally. See issue #210 for more information.

Get the theme

Run from the root of your Hugo site:

git clone https://github.com/victoriadrake/hugo-theme-introduction.git themes/introduction

Alternatively, you can include this repository as a git submodule. This makes it easier to update this theme if you have your Hugo site in git as well:

git submodule add https://github.com/victoriadrake/hugo-theme-introduction.git themes/introduction

Preview the theme

Introduction ships with an fully configured example site. For a quick preview:

cd themes/introduction/exampleSite/
hugo serve  --themesDir ../..

Then visit http://localhost:1313/ in your browser to view the example site.

Add content

The following explains how to add content to your Hugo site. You can find sample content in the exampleSite/ folder.

Introduction section

Create index.md:

hugo new home/index.md

The title frontmatter will be the first large heading.

The content of index.md will be shown as a subtitle line.

You might want to set headless to true in the frontmatter. See headless bundles for more information.

Home page

Content for the home page lives under content/home/. You may add as many files as you want to in markdown format.

Each markdown file will show as a section on the home page and can be ordered by the weight value in the file's frontmatter. You can set image to show an image on the left side of the section. The image file must be in the content/home/ folder.

You may add a contact section by creating contact.md:

hugo new home/contact.md

This will always be shown as the last section on the home page.

Projects section

Introduction provides an easy way to showcase your projects. Each project can even have its own gallery, shown as an image carousel.

Start by creating an index file for the projects section:

hugo new projects/_index.md

Add a title and some optional content to the file. Add an optional weight for ordering projects section.

To create a project, run:

hugo new projects/YourProjectName/index.md

The frontmatter of your new file contains some comments to help your configure your project.

You can set external_link to make the project link to another website.

Add images to your project by placing image files in the YourProjectName/ folder. If you add more then one photo, they will display as a carousel gallery. Images will be ordered by filename. The first image will be shown as the project preview image. You can change the order of your images by adding a weight to that resource's parameters:

resources:
    - src: NameOfYourImage.jpg
      params:
          weight: -100

Blog section

Create an index file for the blog:

hugo new blog/_index.md

Add an optional weight for ordering blog section on your homepage

Create a new blog post with:

hugo new blog/YourEntryTitle.md

Posts will also display in the Blog section of the home page.

Configure your site

From exampleSite/, copy config.toml to the root folder of your Hugo site and change the fields as you like. Helpful comments are provided.

Multilingual

Introduction currently ships with support for many languages. Contributions for other language translations are welcome.

To create a new language translation, add the .toml file to the i18n/ folder. See the existing files for the necessary fields.

See the hugo documentation for more details.

Menu

Introduction contains a default menu. If you want to override this, you can do so by defining a menu.main in config.toml.

Google Analytics

Set googleAnalytics in config.toml to activate Hugo's internal Google Analytics template.

Disqus

Set disqusshortname in config.toml to activate Hugo's internal Disqus template.

Custom CSS

You can add custom CSS files by placing them under assets/ and adding the paths to the files to the customCSS list in config.toml.

Custom JavaScript

You can add custom JavaScript files by placing them under assets/ and adding the paths to the files to the customJS list in config.toml.

Issues

If you have a question or get stuck, please open an issue for help and to help those who come after you. The more information you can provide, the better!

Contributing

Contributions for new translations, fixes, and features are welcome.

This theme would not be nearly as awesome without its amazing community of open source contributors. Thank you so much! 🖤

License

Copyright (C) 2017-2020 Victoria Drake

Licensed under Apache-2.0