gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.63k stars 7.45k forks source link

Better commands for themes #4075

Closed calintat closed 6 years ago

calintat commented 6 years ago

Hi,

Would it be possible to add new commands or update the old commands to work better with themes?

Right now to create a new theme, you first need to create a new site with hugo new site and then inside that site, you can create a new theme with hugo new theme. This is fine if you're making a site, but if you're making a standalone theme which you intend to share on https://themes.gohugo.io then you also need an exampleSite directory inside your theme directory so it's a bit redundant to have a site inside a theme inside another site so I was thinking why not eliminate the site at the top?

This is what I've been doing and to run the theme, I am using the following alias:

alias hugo-serve-theme="hugo serve --source=exampleSite --themesDir=../.."

It would be really nice if this was built into Hugo (it could be called something like hugo serve theme) and also if the hugo new theme command was updated such that if it is called inside a directory that isn't a site then it should create an empty theme with an empty site in the exampleSite folder.

I think this would encourage people to create more standalone themes meant to be used by multiple sites and shared on https://themes.gohugo.io instead of creating local themes used by only one site.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.