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

Missing menus #21

Closed
jwp23 opened this issue Apr 5, 2023 · 17 comments
Closed

Missing menus #21

jwp23 opened this issue Apr 5, 2023 · 17 comments

Comments

@jwp23
Copy link

jwp23 commented Apr 5, 2023

I am trying to install the theme and do not see the menu. I copied the exampleSite as outlined in #16 .

When I run in the root directory of my repo the command
hugo server --source ./ --themesDir ./themes
I don't see the menu. I also tried
hugo server -D
and I get the same result

When I use the exampleSite directory in the theme, with the below command I see the menu
hugo server --source ./themes/paige/exampleSite --themesDir ../..

@willfaught
Copy link
Owner

willfaught commented Apr 5, 2023

This is how Paige does it:

https://github.com/willfaught/paige/blob/master/.github/workflows/pages.yml#L28-L29

Run hugo server in exampleSite, and tell it the path to the directory that contains Paige with --themesDir. For example:

$ git clone ...
$ cd paige/exampleSite
$ hugo server --themesDir ../..

Edit: Changed checkout to clone

@jwp23
Copy link
Author

jwp23 commented Apr 5, 2023

Thanks for the prompt response. I can see that the site builds with the menus when I cd into ./themes/paige/exampleSite and run the hugo server --themesDir ../... What I'm not clear on is why the menus are not showing when I copy the contents of the ./themes/paige/exampleSite into my root directory and run the `hugo server -D`` command. My goal is to have a working example site in my project directory.

@jwp23
Copy link
Author

jwp23 commented Apr 5, 2023

I think I know what happened. I had both a config.toml and a config.yaml in my root directory. I converted the contents of the config.yaml to toml and added them to config.toml. I removed the config.yaml. Now I see the menus.

@willfaught
Copy link
Owner

OK, I’m glad it’s resolved.

Note that the recommended way to install Paige is to import it as a module. See the readme instructions for that.

@jwp23
Copy link
Author

jwp23 commented Apr 5, 2023

Yes, I imported Paige as a module. The instructions were a bit confusing. I followed the Hugo Quickstart guide and then followed your installation instructions in the README.

@willfaught
Copy link
Owner

What was confusing about the Paige instructions?

@jwp23
Copy link
Author

jwp23 commented Apr 5, 2023

It wasn't clear whether I needed to follow the Hugo Quickstart to install the theme. It also wasn't clear that the config.yaml examples conflicted with the config.toml that hugo creates

@willfaught
Copy link
Owner

Thanks, that's helpful. How did the config.yaml examples conflict?

@jwp23
Copy link
Author

jwp23 commented Apr 5, 2023

I thought the config.yaml was something theme specific as opposed to config.toml which I thought was Hgo specific. I had both files in my root directory. It wasn't until I combined the two that my issue was resolved.

@jwp23 jwp23 closed this as completed Apr 7, 2023
@willfaught
Copy link
Owner

I'm going to keep this open for now. I plan to update the readme instructions to avoid this confusion.

@willfaught willfaught reopened this Apr 7, 2023
@willfaught
Copy link
Owner

@jwp23 What do you think of the new setup section in the readme? You can see it live at https://github.com/willfaught/paige. Does that avoid the confusion?

@jwp23
Copy link
Author

jwp23 commented Apr 8, 2023

@willfaught That is clearer. One question I have is it necessary to use git submodules instructions int the hugo get started guide if you import the Paige module with the hugo mod command and adding the module to the config.toml? One other note is that it would be clearer if you explained whether you only need the config.toml that comes with the hugo new site command or whether you can have both config.toml that comes with the hugo new site and the config.yaml file that you use in the examples.

@willfaught
Copy link
Owner

willfaught commented Apr 8, 2023

Importing as a module with hugo mod is separate from putting a copy of Paige into your themes directory with git submodule. The themes directory is the old way of doing things. Perhaps it’s confusing to include the Hugo getting started link at all.

I use YAML for my own stuff, so I was thinking if you know Hugo, you’ll know that config.yaml and config.toml are equivalent. I guess that’s not clear if you don’t know Hugo well, and want to get started with Paige quickly. I suppose it would be clearer for the docs to use TOML too. I dislike TOML, but perhaps it’s worth ignoring that here. :)

@jwp23
Copy link
Author

jwp23 commented Apr 8, 2023

I'll have to try using the theme without using the git submodule. I think it's ok to use yaml for the documentation as long as it's clear that it's one or the other. I used a yaml to toml online converter to take your configuration samples and put it into my config.toml. I like yaml but I want to learn toml.

@willfaught
Copy link
Owner

I converted the YAML to TOML in the readme: f599489

@willfaught
Copy link
Owner

I also added links to Hugo's install and module guides.

@willfaught
Copy link
Owner

I'm going to close this, since I've made all the changes I planned. If you still see an issue, please reopen this or open a new issue.

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

2 participants