hugo-theme-anubis icon indicating copy to clipboard operation
hugo-theme-anubis copied to clipboard

Just a question from a Hugo newbie

Open aspantel opened this issue 3 years ago • 15 comments

Hi Dmitry,

I like the theme!

I am new to Hugo, and just installed it and your theme for the first time. Could you help me understand how an About and Tags pages can be added like on your demo blog.

Thank you.

aspantel avatar Feb 10 '22 00:02 aspantel

Hi!

About — you should create about.md and fill it like a common post (meta + text). Tags — just add a link to config, page is created on build. And add both to the config - menu section.

YAML-format

menu:
  main:
  - identifier: about
    name: About
    title: About
    url: /about/
    weight: 1
  - identifier: tags
    name: Tags
    title: tags
    url: /tags/
    weight: 2

TOML-format

[menu]

[[menu.main]]
identifier = "about"
name = "About"
url = "/about/"
weight = 1

[[menu.main]]
identifier = "tags"
name = "Tags"
url = "/tags/"
weight = 2

Mitrichius avatar Feb 10 '22 07:02 Mitrichius

Спасибо. Проверю.

aspantel avatar Feb 10 '22 13:02 aspantel

Would you recommend using type: static like this article suggests? https://code.luasoftware.com/tutorials/hugo/hugo-static-page-like-about/

One more question. Can I have N articles in english and M articles in another language (i.e. russian) with this theme? Thanks

aspantel avatar Feb 10 '22 16:02 aspantel

Is there a way to add a logo in the header (instead of the title or in front of it)? https://www.evernote.com/l/AGOFv6-V1BBL06OSTpDAKpjqSPG6QEmoDxwB/image.png

aspantel avatar Feb 10 '22 17:02 aspantel

Would you recommend using type: static like this article suggests?

No, static type requires a separate layout to render, which is not presented in theme. page default type is enough (you don't have to specify it).

Can I have N articles in english and M articles in another language (i.e. russian) with this theme?

Yes. post1.md, post1.ru.md, post2.md — two posts on default language, one of them in Russian.

Is there a way to add a logo in the header (instead of the title or in front of it)?

It's not possible right now unless you override partials/header.html layout. I can extract site-title in a separate layout to change only title on logo

Mitrichius avatar Feb 11 '22 07:02 Mitrichius

I am trying to see if we can use this theme for a company/team blog. It would be nice to be able to insert our logo in the header so it would look like this https://www.aurinko.io/

aspantel avatar Feb 11 '22 13:02 aspantel

Extracted site-title to separate layout. So you can add layouts/partials/site-title.html file and add logo (and everything else) to it. As example:

<img style="height: 50px; margin-top: 15px;" src="http://autodrive.org.ua/wp-content/uploads/2018/11/final-logo-example.png">
anubis-logo-example

Mitrichius avatar Feb 12 '22 07:02 Mitrichius

Не пойму, мне как-то надо последние изменения темы подтянуть?

git submodule status 0a9b5ae9bb8f50eebec46dddb5f1140fc17e1fbc themes/anubis (1.0-212-g0a9b5ae)

aspantel avatar Feb 13 '22 17:02 aspantel

This seems to have done it: git submodule update --remote --merge

aspantel avatar Feb 13 '22 17:02 aspantel

Почему-то страница тагов у меня пустая, хотя в статье одной я прописал таги https://www.evernote.com/l/AGPopdMbKxJNrqhorMpYn13VRYRUBjsolesB/image.png

Я что-то в настройках Хуго упустил?

aspantel avatar Feb 16 '22 15:02 aspantel

The only condition is that post shouldn't be hidden

Are tags shown on post single page? Something like this:

tags-example

Mitrichius avatar Feb 17 '22 11:02 Mitrichius

Yes, my one post shows the tags. Yet, the tags page does not show anything. My post is a draft at the moment. Could that be the reason? I'll test.

aspantel avatar Feb 17 '22 13:02 aspantel

Could you show metadata for this post + location of the post file?

Mitrichius avatar Feb 18 '22 06:02 Mitrichius

Having all my posts in draft was the problem. Once I truned off the draft flag for About the tags started showing. I am all set. https://blog.aurinko.io/ Thank you!

By the way, how about SEO. Is there a standard approach in Hugo or something special in your theme to prepare posts for search engines. Specifying metadata description, keywords, ....

aspantel avatar Feb 18 '22 16:02 aspantel

Title by template: post title - site title

Lookup order for description:

  • description meta param from post
  • summary meta param from post (as I understood it generates automatically if not presented)
  • description from site config - params section

Keywords: by post "keywords" param, added in the latest commit.


Perhaps I will add some new tags as part of the #143

Mitrichius avatar Feb 22 '22 15:02 Mitrichius

Closing this issue due to inactivity. If the issue is still here, feel free to reopen it.

Mitrichius avatar Apr 24 '23 09:04 Mitrichius