digitalcraftsman / hugo-creative-theme

Port of Startbootstrap's Creative theme to Hugo
Apache License 2.0
138 stars 116 forks source link

Amendment: blogging functionality for this theme #34

Open luca-ing opened 6 years ago

luca-ing commented 6 years ago

I really like this theme, and would like to use it for my site. However, I'd like to blog as well.

If I prepare a PR adding blogging functionality, would you be willing to accept it? If you prefer to leave the theme as it is that's fine, but I'd like to give back, if you want the contribution.

digitalcraftsman commented 6 years ago

Hello @luca-ing,

pull request are of course welcomed. Before you start to modify the theme it would be great if you could outline your proposed addition(s) :wink:

MatthewMcD commented 6 years ago

Is blogging (or at least building the content directory) intentionally disabled in this theme? I am REALLY NEW to hugo. When I build my site with another theme it creates the posts, when I use this theme it does not. Am I missing something as I would like to use it for blogging in addition to the portfolio aspect.

CodePoetSarah commented 6 years ago

I am running into the same issue. I love the theme but can't generate pages off it, they are output as XML for some reason. Any thoughts on the cause? I don't mind diving into it although @digitalcraftsman may have more insight.

Nice work on the theme by the way, it's really nicely done.

MatthewMcD commented 6 years ago

I dove into this last night. The whole "blogging" part is absent, so posts are not handled. If you add the layouts required from another template or build your own it can be done. (But at this point I am too much a novice to make it happen.) I'll probably keep this as a top level site and look elsewhere for the blogging framework.

CodePoetSarah commented 6 years ago

@MatthewMcD thanks for the update, I'll take a look this weekend and see if I can figure it out. Much appreciated.

luca-ing commented 6 years ago

I had the the theme modified to add blogging functionality.

I've been meaning to write a pull request. I'm currently on mobile, but I'll get on it soon.

Blogging functionality exists!

Am 27. März 2018 16:27:33 schrieb Andrew Thornton notifications@github.com: I am running into the same issue. I love the theme but can't generate pages off it, they are output as XML for some reason. Any thoughts on the cause? I don't mind diving into it although @digitalcraftsman may have more insight. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

MatthewMcD commented 6 years ago

Can we just fork or clone your repo?

luca-ing commented 6 years ago

Sure. I just need to get home so I can send you the link ;-)

Am 27. März 2018 18:17:12 schrieb Matthew McDermott notifications@github.com: Can we just fork or clone your repo? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

MatthewMcD commented 6 years ago

@luca-ing Did you make it home? (You must have an EPIC commute =8-) )

luca-ing commented 6 years ago

@MatthewMcD Heh, sorry, I completely forgot :-)

I've created a PR: https://github.com/digitalcraftsman/hugo-creative-theme/pull/42

If you prefer not to wait until it gets approved, feel free to use my fork of course.

MatthewMcD commented 6 years ago

I found a typo that prevents the initial build in the footer.html partial. The line: <p>Copyright &copy {{ .Now.Year }} {{ .Site.Params.Name }}</p> I changed to: <p>Copyright &copy; {{ now.Year }} {{ .Site.Params.Name }}</p>

MatthewMcD commented 6 years ago

I am having two other issues that are probably related to my being new to Hugo.

  1. The Post page still has the huge header image and the post begins "below the fold". I guess I need to override a content section on the page. (First, I'll generate a new site and apply your template to be sure it's not crap from my code.)

  2. The URL for my blog is http://www.site.com/blog/ but the Archive is rendering at http://www.site.com/archive not http://www.site.com/blog/archive. (I am migrating so I want to keep the URLs the same.)

MatthewMcD commented 6 years ago

OK, I created a new site and then populated it with your example site contents. The result is interesting but still not "right". After adding the permalink setting: paginate = 3 # Post pagination for the main blog page. [permalinks] blog = "/blog/archive/:year/:month/:day/:title/"

It is BEAUTIFUL. Nice job on the "Latest Blog Posts" section on the home page. This also fixed the rendering on the post page (#1 above).

The last things I need to sort out are Tags and Categories. Also, I would like summary pages to render on the :Year and :Month pages like http://www.site.com/blog/archive/2017/10.

ybtre commented 4 years ago

@MatthewMcD @luca-ing Wondering if you're still familiar with the PR and wouldnt giving me a hand with adding the blogging PR into my site. I've got an issue with loading the css/js/resources of blogs when I open them. Works when I'm hosting locally but not when I've deployed through Netlify. If yes i'd gladly give you guys access to the code to take a look :)

MatthewMcD commented 4 years ago

@ybtre I can try and have a look this weekend. I have no experience with Netlify as I self host in Azure. But I'll take a look and see if I can get you unstuck.