Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Just a question from a Hugo newbie #137

Closed
aspantel opened this issue Feb 10, 2022 · 16 comments
Closed

Just a question from a Hugo newbie #137

aspantel opened this issue Feb 10, 2022 · 16 comments

Comments

@aspantel
Copy link

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.

@Mitrichius
Copy link
Owner

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

@aspantel
Copy link
Author

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

@aspantel
Copy link
Author

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
Copy link
Author

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

@Mitrichius
Copy link
Owner

Mitrichius commented Feb 11, 2022

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

@aspantel
Copy link
Author

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/

Mitrichius added a commit that referenced this issue Feb 12, 2022
@Mitrichius
Copy link
Owner

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

@aspantel
Copy link
Author

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

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

@aspantel
Copy link
Author

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

@aspantel
Copy link
Author

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

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

@Mitrichius
Copy link
Owner

The only condition is that post shouldn't be hidden

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

tags-example

@aspantel
Copy link
Author

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.

@Mitrichius
Copy link
Owner

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

@aspantel
Copy link
Author

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, ....

Mitrichius added a commit that referenced this issue Feb 22, 2022
@Mitrichius
Copy link
Owner

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 added a commit that referenced this issue Feb 22, 2022
Mitrichius added a commit that referenced this issue Feb 22, 2022
@Mitrichius
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants