Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMinimalist website with homepage as content #330
Comments
This comment has been minimized.
This comment has been minimized.
I'm working on exactly this use case. Hope to have something ready soon. |
This comment has been minimized.
This comment has been minimized.
Great! |
This comment has been minimized.
This comment has been minimized.
Exactly what i'm looking for! |
This comment has been minimized.
This comment has been minimized.
Hi @spf13, any update on this feature? |
This comment has been minimized.
This comment has been minimized.
This feature is also interesting for me. Until now I used an own content type with just one entry, but this then breaks prev and next posts. |
This comment has been minimized.
This comment has been minimized.
mbertschler
commented
Aug 23, 2014
@tkschmidt @falzm @RubenN I managed to come up with workaround that works good for me until there is a proper fix for this:
then add the following code to the
because the |
This comment has been minimized.
This comment has been minimized.
@mbertschler That's pretty brilliant. Way to work within the system. I don't mind that solution at all.... of course it would be nice to have a proper one at some point. |
This comment has been minimized.
This comment has been minimized.
zwotzie
commented
Dec 22, 2014
@mbertschler : in my setup with v0.12. it is not a solution. Which version do you use? |
This comment has been minimized.
This comment has been minimized.
mbertschler
commented
Dec 22, 2014
@zwotzie I am using v0.12 Contents of
Contents of
Contents of
I hope that helps. |
This comment has been minimized.
This comment has been minimized.
zwotzie
commented
Dec 22, 2014
@mbertschler that works perfekt for me, except the title, which will be used from the config-file but that ok. Thank you very much. |
This comment has been minimized.
This comment has been minimized.
tlipski
commented
Jan 7, 2015
@mbertschler - I like your solution, but wouldn't it better to write in index.html something like this?
|
This comment has been minimized.
This comment has been minimized.
mbertschler
commented
Jan 7, 2015
@tlipski it should work that way as well. How you write that part is totally irrelevant, because /index.html will only get generated once. |
This comment has been minimized.
This comment has been minimized.
tlipski
commented
Jan 7, 2015
@mbertschler I altered it this way so next/prev/title can work properly |
spf13
modified the milestones:
v0.13,
v0.14
Feb 22, 2015
This comment has been minimized.
This comment has been minimized.
codethief
commented
Mar 18, 2015
After two hours of trying to find out how to create a simple, non-blog – in that sense, actually static – website with Hugo, I finally arrived here. Thanks for the workarounds, guys! |
This comment has been minimized.
This comment has been minimized.
gutenye
commented
Jun 19, 2015
Nice workarounds, I really wish Hugo can support it by default |
anthonyfok
modified the milestones:
v0.15,
v0.14
Jun 19, 2015
This comment has been minimized.
This comment has been minimized.
irisli
commented
Jun 30, 2015
It would be great if Hugo had better support for homepage as a content file (and not as a layout file). On the sites I've been using Hugo on, the home page layout is the same as some other content pages. |
This comment has been minimized.
This comment has been minimized.
codethief
commented
Jul 31, 2015
@spf13 Any news regarding this issue? I would love to use Hugo for static pages. |
This comment has been minimized.
This comment has been minimized.
I needed to customize some CSS only on the homepage, so I wanted to add a class to the <body class="page-{{ .Title | urlize }}"> And now I can make a CSS rule like: body.page-title-of-my-site {
background-color: #000;
} that's only applied on the homepage. |
This comment has been minimized.
This comment has been minimized.
rhewitt22
commented
Nov 2, 2015
|
This comment has been minimized.
This comment has been minimized.
fazy
commented
Nov 5, 2015
After experimenting with themes, I decided to build my site from the ground up (but looking at themes for reference). It's a small, personal site, but I want to devote most of the home page to my Flickr photos feed, and relegate the blog to a sub-section. As such, the home page will be fairly bespoke, with very little blog content, while the blog section will fit well with the content/templates model used by Hugo. So just to see it working (hello world, minimum viable product, iterate...) my entire home page is like this: layouts/index.html
Then I have the content files: content/index/heading.md
content/index/intro.md
I've basically done the same as @mbertschler (thanks!), but with the ability to have a couple of bits of content in different parts of the home page. I'm not 100% sure if I'll need that yet, but it's good to have the flexibility if I decide not to do the whole template in markdown. Edit: I can probably do the whole home page in a single markdown file using Shortcodes for any complex bits like a Flickr carousel. Still, it might be useful to get bits of content from various places at times. ;) |
This comment has been minimized.
This comment has been minimized.
fazy
commented
Nov 5, 2015
This work-around doesn't seem to work for partials. For example, if including code like this:
How can I determine what page I am really on so as to display the correct title? |
This comment has been minimized.
This comment has been minimized.
Use The discussion site for questions. |
bep
closed this
Nov 5, 2015
This comment has been minimized.
This comment has been minimized.
fazy
commented
Nov 5, 2015
If I delete my question above, will you re-open this feature request? I think a number of people would like to have an index page. |
This comment has been minimized.
This comment has been minimized.
My bad ... I thought this was a new topic... Yes, this will come at some point. |
bep
reopened this
Nov 5, 2015
This comment has been minimized.
This comment has been minimized.
fazy
commented
Nov 5, 2015
That's very good to know, thanks. :) And sorry to be lazy about signing up for the forums, but I've done that now. |
This comment has been minimized.
This comment has been minimized.
mbertschler
commented
Nov 27, 2015
I would like to fix this for the next release. The question is how this could be implemented. My proposal would be that if there is an What are your thoughts? |
This comment has been minimized.
This comment has been minimized.
rhewitt22
commented
Nov 27, 2015
Simple, solid solution. I think the homepage should also fall back on Roy
|
This comment has been minimized.
This comment has been minimized.
I think this may already be the case.
|
This comment has been minimized.
This comment has been minimized.
This may be part of the solution, but it doesn't resolve all the issues. it
|
This comment has been minimized.
This comment has been minimized.
See https://discuss.gohugo.io/t/node-improvements/1593 Please, no hacks just to get the home page to "somehow work". |
anthonyfok
modified the milestones:
v0.16,
v0.15
Nov 30, 2015
This comment has been minimized.
This comment has been minimized.
richie5um
commented
Jan 25, 2016
@mbertschler Thank you! |
spanezz
referenced this issue
Feb 26, 2016
Closed
{{<figure>}} shortcode breaks relative links when not using uglyURLs #1898
moorereason
modified the milestones:
future,
v0.16
May 7, 2016
This comment has been minimized.
This comment has been minimized.
Will be handled in #2297. |
falzm commentedJun 13, 2014
Hi
I'd like to use Hugo for my personal website, which roughly consists of two HTML pages:
I'm actually struggling to do a simple thing, which doesn't seem to be possible to do with Hugo: write the content of the homepage (a.k.a.
/index.html
) as Markdown —content/index.md
for instance —, among other content pages in thecontent/
directory. For what I understand from the documentation, the homepage has a special status, and requires a dedicated template file for display.My problem is: I don't want the content of the homepage to be directly in the HTML template, I want it to be written as Markdown in
content/
as any other page, and rendered/included in thelayout/index.html
template file. Is there any way to achieve this? If not, what simple workaround can you suggest so I can keep the simple structure of my website?Cheers,
m.