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

Any other side bar item other then projects. #6

Closed
sai-sy opened this issue Jan 15, 2023 · 7 comments
Closed

Any other side bar item other then projects. #6

sai-sy opened this issue Jan 15, 2023 · 7 comments

Comments

@sai-sy
Copy link
Contributor

sai-sy commented Jan 15, 2023

I do the code you put as an example for projects. It works like a charm. I change the folder name and the config file and it doesn't work anymore. I can't custom name side bar sections? Why does it only give me a section when it is called project? Love the theme otherwise thank you!

@lukeorth
Copy link
Owner

Hi @sai-sy, I'm glad you're enjoying the theme!

The sidebar menu will only show items that:

  1. Are listed in your config and
  2. Actually exist in your content directory

I added a Test sidebar item in the following screenshot to demonstrate.

image

The Test item is only shown because I've included it in my config:

menu = [
        {Name = "About", URL = "/about/", HasChildren = false},
        {Name = "Posts", URL = "/posts/", Pre = "Recent", HasChildren = true, Limit = 5},
        {Name = "Test", URL = "/test/", HasChildren = false},
    ]

And I have a test directory inside of my content directory which has a markdown file. So I have the following structure:

project_home/content/test/test.md

Hopefully that helps!

@sai-sy
Copy link
Contributor Author

sai-sy commented Jan 16, 2023

I thought so but I have 4 directories
image
with a config file like this

    menu = [
        {Name = "About", URL = "/about/", HasChildren = false},
        {Name = "Posts", URL = "/posts/", Pre = "Recent", HasChildren = true, Limit = 5},
        {Name = "Projects", URL = "/projects/", Pre = "Recent", HasChildren = true, Limit = 5},
        {Name = "Project", URL = "/project/", Pre = "Recent", HasChildren = true, Limit = 5},
	    {Name = "Test", URL = "/test/", HasChildren = true},
]

And yet my output looks like this
image

I'm super confused on why /project/ displays as Projects and why /test/ doesn't show up at all. Thanks!

@maccident
Copy link

maccident commented Jan 16, 2023

Hey @sai-sy

I'm super confused on why /project/ displays as Projects and why /test/ doesn't show up at all. Thanks!

I believe it's there, but the sidebar does not scroll down, so it is off the screen.
In your browser, go to View then select Zoom Out a few times… I bet you'll see it.
At a minimum, you should see the copyright notice.

@sai-sy
Copy link
Contributor Author

sai-sy commented Jan 16, 2023

Doesn't explain why /project/ is displayed as Projects when it's explicitly told not to. Super weird. I changed my test to copy your original config and directory example with the test and tried zooming out. Nothing shows up. In the screenshot the copyright is just cropped out. Maybe I configured hugo somewhere else wrong but I don't get how ANY misconfiguration can lead to such weird circumstances

@sai-sy
Copy link
Contributor Author

sai-sy commented Jan 16, 2023

To confirm, all my config work should be done in ./config.toml not ./themes/poison/config.toml. I assume hugo only needs the theme = 'poson' to understand where to get the ./themes/poison/layouts/partials/sidebar/menu.html` information

@maccident
Copy link

@sai-sy

To confirm, all my config work should be done in ./config.toml not ./themes/poison/config.toml. I assume hugo only needs the theme = 'poson' to understand where to get the ./themes/poison/layouts/partials/sidebar/menu.html` information

Here is my menu section:

  menu = [
    {Name = "About", URL = "/about/", HasChildren = false},
    {Name = "Authors", URL = "/authors/", HasChildren = false},
    {Name = "Categories", URL = "/categories/", HasChildren = false},
    {Name = "Posts", URL = "/posts/", Pre = "Recent", HasChildren = true, Limit = 5},
    {Name = "Series", URL = "/series/", HasChildren = false, Limit = 5},
    {Name = "Tags", URL = "/tags/", HasChildren = false},
  ]

You need to make each directory and place a file (empty is fine) in each menu directory.
For example, I have an empty file in content/about/markdown.md
Same for each other directory.

@sai-sy
Copy link
Contributor Author

sai-sy commented Jan 16, 2023

That's exactly how I have it. Maybe I've configured hugo or go wrong because the behaviour I'm getting seems random and unrepeatable. Thank you for the support and great work on a beautiful theme.

@sai-sy sai-sy closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2023
@lukeorth lukeorth mentioned this issue Feb 3, 2023
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