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
merged 3 commits into from
Jan 11, 2017

Conversation

key-amb
Copy link
Collaborator

@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
[[params.mainMenu]]
  name = "Index"
  link = "index/"

Note

@key-amb key-amb merged commit 5eb1754 into master Jan 11, 2017
@key-amb key-amb deleted the maint branch January 11, 2017 21:36
@ethanmad
Copy link

ethanmad commented Jan 11, 2017

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

@key-amb
Copy link
Collaborator Author

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 https://gohugo.io/extras/menus/ .

But I've not worked for this yet.

@ethanmad
Copy link

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants