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

Merged
merged 3 commits into from Jan 11, 2017

Conversation

Projects
None yet
2 participants
@key-amb
Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@ethanmad

ethanmad Jan 11, 2017

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

ethanmad commented Jan 11, 2017

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

@key-amb

This comment has been minimized.

Show comment
Hide comment
@key-amb

key-amb Jan 11, 2017

Collaborator

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.

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@ethanmad

ethanmad 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.

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