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

Menu generation using Content file instead directories #5

Merged
merged 2 commits into from Oct 2, 2016

Conversation

Xipas
Copy link
Contributor

@Xipas Xipas commented May 25, 2016

This implementation use the sample i posted on #2 with a few changes:

keep compatibility with current versions

only activated when

createFromSiteMenusMain = true

on config.toml

Feature a 3rd Level menu:

capture

TODO

Need to add to the archetypes the correct information to create the menu, need suggestions on how we change this.

we can create them on the content page

chapter.md

--- 
title : "Title to show"
prev: /prev/path
next: /next/path
chapter: true 
menu:
  main:
    identifier : "Unique_ID_OF_PAGE"
    weight: 5
    name : "Title to show"
    pre : '<b>1.</b>'

---

default.md

---
title: What is this Hugo theme ?
prev: /prev/path
next: /next/path
menu:
  main:
    identifier : "Unique_ID_OF_PAGE"
    parent: 'Unique_ID_OF_PARENT'
    weight: 5
    name : "What is this Hugo theme"

---

or on the config.toml

--- 
menu:
  main:
      - Name: "about hugo"
        Pre: "<i class='fa fa-heart'></i>"
        Weight: -110
        Identifier: "about"
        URL: "/about/"
      - Name: "getting started"
        Pre: "<i class='fa fa-road'></i>"
        Weight: -100
        URL: "/getting-started/"

---

what do you think?

Regards,
André

Xipas added 2 commits May 25, 2016 01:22
t push origin masterMerge branch 'Xipas-master'
… using params .createFromSiteMenusMain on toml file.
@Xipas Xipas mentioned this pull request May 25, 2016
@1ambda
Copy link

1ambda commented Jun 25, 2016

Any plan for this PR?

@jcscottiii
Copy link

+1

@matcornic
Copy link
Owner

I merged, then reverted. Actually, for ordering the menu, I'd go with the PR8 . It's pretty straightforward and does not complexify the usage (no boolean with a sort of mode).

I know your PR also covers the increasing of possible sub chapters. So I created another issue for this feature specifically : #11

dcrankshaw pushed a commit to dcrankshaw/hugo-theme-learn that referenced this pull request Sep 13, 2017
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.

None yet

4 participants