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
Merged

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

  • I do 2nd change because I've noticed the link of Index of demo site http://key-amb.github.io/bootie-docs-demo/ has broken.
  • Another way to shoot #20 is here: 0e9a6bc
    • In this change, one have to change the title param of _index.md. 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
@ethanmad
Copy link

@ethanmad 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 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 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants