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

Fix #20 / Use .IsHome and change way to detect active menu link #21

merged 3 commits into from Jan 11, 2017


Copy link

@key-amb key-amb commented Jan 11, 2017

  1. Thanks to @ethanmad , use .IsHome introduced in Hugo v0.15 to detect if current page is Home or not
  2. Change not to append trailing / by header.html
    • One should add / to link param of menu item if ze wants to match xxx/ URL like below:
# config.toml
  name = "Index"
  link = "index/"


  • I do 2nd change because I've noticed the link of Index of demo site has broken.
  • Another way to shoot #20 is here: 0e9a6bc
    • In this change, one have to change the title param of I think this is rather confusing, so I don't take this approach.
@key-amb key-amb merged commit 5eb1754 into master Jan 11, 2017
@key-amb key-amb deleted the maint branch Jan 11, 2017
Copy link

@ethanmad ethanmad commented Jan 11, 2017

It's strange that change 2 was necessary for you and not for me.

Copy link
Collaborator Author

@key-amb key-amb commented Jan 11, 2017

Maybe the 2nd change is a workaround.
But I can't leave the demo site broken.

Maybe we can do this better by Hugo's menu feature .

But I've not worked for this yet.

Copy link

@ethanmad ethanmad commented Jan 12, 2017

I think using the built-in menu feature is a good idea for a future change.
I didn't know about it until just now.

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

Successfully merging this pull request may close these issues.

None yet

2 participants