blog/README.md

1.7 KiB

the kemonomimi blog

This is the source for the kemonomimi blog. This repo contains both the Hugo site, and the contents on the site.

Local setup

You'll need to install gohugo from your distro's repos.

Once you have that, start a test server with

 $ hugo serve --bind 0.0.0.0 -D

To build the website, just run

 $ hugo

and you'll find the output in public/

Adding content

To create a blog post run:

 $ hugo new blog-name/post-name.md

Then, edit content/blog-name/post-name.md in your favourite editor!

Creating a new blog

Create a folder for the blog

 $ mkdir content/blog-name

Create an index for the blog

 $ cat > content/blog-name/_index.md << EOF
   ---
   title: "Your blog's name"
   authors: [ "name here" ]
   ---

   This is a blog introduction.
   EOF

The home page currently doesn't auto-populate blogs, so you'll have to edit content/_index.md to add your name to the index, and layouts/_default/baseof.html to add a link in the common header bar

You can now add blog posts and they'll automatically populate your blog's page.

Editing the template(s)

All the files related to the template are found in layouts/_default.

  • layouts/_default/baseof.html is the common base used for all pages
  • layouts/_default/list.html is the layout used for the blogs' home pages, that contain the blog post list
  • layouts/_default/single.html is the layout used for blog posts

There is also layouts/index.html that controls the layout of the home page

All those templates are filled with content from the content/ folder!

The common CSS file can be found at static/style.css