New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home page at wrong URL, many sections missing #3

Closed
mfioretti opened this Issue Nov 3, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@mfioretti

mfioretti commented Nov 3, 2018

Greetings,

I am trying this theme with hugo v0.50, because it looks great, but I am having major problems. My "content" folder has this structure:

about.md
bio.md
<other pages>
post/  <==== this is the folder where all the blog posts are (renaming it to archives, blog, or anything else does not change what reported below)

the problem is that, with this theme only_

  • the home page, listing of all posts from newest to oldest, is /post/index.html, instead of being /index.html . That page is blank (only site name, menu and footer).
  • categories and tags of a post are not listed below it
  • it is not clear where/how to insert and format a sidebar
  • no search bar appears

The relevant part of the config.toml file is below. Changing publishDir to any value (post, /, whatever) seems to make no difference). Thanks in advance for your help

theme = "mediumish-gohugo-theme"

summaryLength = 25
sidebar       =  "true"
search        = "true"
publishDir    = "/"
Paginate=10
paginate=10
[permalinks]
   archives = "/:year/:month/:title/"
   post = "/:year/:month/:title/"
   
[taxonomies]
    category = "category"
    tag = "tag"

[Indexes]
    tag      = "tag"
    category = "category"

@lgaida

This comment has been minimized.

Owner

lgaida commented Nov 4, 2018

Hi @mfioretti

  • The /index.html is blank because you did not configure your blog correctly. The /index.html, in this theme, is a welcome/about/bio-page, depending on what you configure it to show in your config. The blogposts should be placed in a subfolder of your contentfolder. And the URL will then be subfolder/index.html to list all the posts.
  • To achieve the same rendering for other "standalone"-pages (bio.md and about.md) place the corresponding files in a content-subfolder named "static".
  • As for taxonomies, only tags are supported at the moment. And you will have to assign your tags in the frontmatter of every of your posts
  • There is no "sidebar" or "searchbar" in this theme, hence your config-params "search" and "sidebar" do not affect anything.

I recommend reading the README again.

@lgaida lgaida closed this Nov 4, 2018

@lgaida lgaida self-assigned this Nov 4, 2018

@mfioretti

This comment has been minimized.

mfioretti commented Nov 4, 2018

Hi @mfioretti

The /index.html is blank because you did not configure your blog correctly. The /index.html, in this theme, is a welcome/about/bio-page, depending on what you configure it to show in your config.

Hello @lgaida

Indeed, now I see that I was wrong to assume that this theme has search and sidebar. No idea why I gave it for granted, sorry. No big deal however, these are not showstoppers. About the other issues:

  1. Does this mean that, in this theme, the content of index.html is ONLY what goes in the params.index section of config.toml? Please confirm, or explain if I misunderstood
  2. "blogposts should be placed in a subfolder of your contentfolder. And the URL will then be subfolder/index.html to list all the posts": is there no way to change this behaviour in the general configuration settings? If not then switching to this theme would break lots of internal and external links in and to my posts.

If the issues above are confirmed, then OK, this specific theme does not suit my specific needs. Too bad, because it really looks great.

Thanks

@lgaida

This comment has been minimized.

Owner

lgaida commented Nov 7, 2018

Hello @mfioretti

No problem :)
Quickly answering your questions:

  1. Exactly that
  2. You will have to use the subfolders in this theme. However, you might be able to trick around it.

What you can try to hack around it:

  • copy this themes list.html (see layouts/_default/list.html) to the layouts folder in your projects root
  • rename this copied list.html to index.html

Hugo uses a specific template lookup order for rendering your project. So hugo should use your projects layouts/index.html instead of the theme one. If so, then you can also try to use the contentfolder directly instead of the subfolders.

Greetings 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment