Skip to content
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

Error: Unable to find theme directory #1

Closed
theonesp opened this issue Jul 9, 2018 · 6 comments
Closed

Error: Unable to find theme directory #1

theonesp opened this issue Jul 9, 2018 · 6 comments

Comments

@theonesp
Copy link
Collaborator

theonesp commented Jul 9, 2018

When running hugo serve
I keep getting the error

Error: Unable to find theme Directory:~\Documents\GitHub\critical-data\themes\hugo-universal-theme

@tompollard
Copy link
Member

We should perhaps include this theme as a subproject in GitHub, but for now you can install the theme by navigating to the base directory for the project (i.e. ~\Documents\GitHub\critical-data\, then:

  1. creating a directory called themes (e.g. mkdir themes)
  2. changing into the themes directory (e.g. cd themes)
  3. cloning the theme that you need (e.g. git clone git@github.com:devcows/hugo-universal-theme.git)

For more information on themes, see: https://gohugo.io/themes/installing-and-using-themes/

@alistairewj
Copy link
Member

You need to clone the repository recursively otherwise the theme, which is a submodule, isn't cloned. See the README, specifically command git clone --recurse-submodules git@github.com:MIT-LCP/critical-data.git

If you did that and it didn't work then the submodule might be configured incorrectly in which case just clone the hugo-universal-theme repo into the themes/hugo-universal-theme subfolder.

@tompollard
Copy link
Member

I don't think it is a submodule at the moment (or at least it isn't listed as a submodule on GitHub).

@alistairewj
Copy link
Member

That would explain that!

@theonesp
Copy link
Collaborator Author

theonesp commented Jul 9, 2018

I had cloned the repo recursively when getting the error.
So I created a folder for the theme where the missing directory was and copied the files from the hugo universal theme, so pretty much what you recommended, it works now!
thanks

@tompollard
Copy link
Member

@theonesp glad you manage to fix it! Rather than pushing changes directly to the master branch, please could you submit them via pull requests, so we can review before merging?

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

No branches or pull requests

3 participants