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

Move some pages to development section #71

Merged
merged 6 commits into from
Jan 14, 2021
Merged

Conversation

sagikazarmark
Copy link
Member

@sagikazarmark sagikazarmark commented Dec 9, 2020

This PR moves some development pages to a new section called development.

Some remaining tasks:

  • There is no actual content on the development page (yet? maybe there should be?), so it shouldn't show up in the side menu as a link
  • Development should show up as the last section in the menu
  • Contributing should be moved here as soon as Update contributing.md #69 is merged

@nate-double-u can you help me out here? I'm not a huge Hugo expert as you are. ;)

@nate-double-u
Copy link
Contributor

The location of menu items on the sidebar is based on the weight value in each page's frontmatter. I've revised all the frontmatter weight values to make it clearer what the groups are, and where each page should sit in the menu. (Sorry for inflating the files changed count!).

I also fixed an issue where "On this page:" was showing up even if the toc frontmatter variable was set to false.

@nate-double-u
Copy link
Contributor

There is no actual content on the development page (yet? maybe there should be?), so it shouldn't show up in the side menu as a link

This may be a bigger issue. We are using the section-nav.html file to build this component, and it's not doing any checks for content in the pages that it's using to build the menu.

I've only just started using Hugo myself, but now I'm curious if there is a way of checking for empty files -- if we can check, then we can render that menu content a little differently. My usual workaround has been to add content to those top-level menu pages 😅️

@sagikazarmark
Copy link
Member Author

This may be a bigger issue. We are using the section-nav.html file to build this component, and it's not doing any checks for content in the pages that it's using to build the menu.

It doesn't matter that much. We can write some random text about "This section explains how you can....blahblah".

@nate-double-u
Copy link
Contributor

We can write some random text about "This section explains how you can....blahblah".

This is definitely the easier solution 😉️

@nate-double-u
Copy link
Contributor

nate-double-u commented Dec 9, 2020

I'll keep thinking on this menu issue though, this is going to come up more and more as the Hugo Netlify Template Starter gets used. If we implement a solution there I'll look at merging it downstream.

@@ -4,7 +4,7 @@ description: ""
date: 2020-09-30
draft: false
toc: true
weight: 100
weight: 3100
Copy link
Contributor

@nate-double-u nate-double-u Dec 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the default sort is alphabetical when files have the same weight.
dev-integration-tests.md and dev-releases.md both have a weight of 3100 set. I'd suggest being more explicit about the weights, so even if you want alphabetical sorting, I'd set the weights to reflect that.
(lower weight gets higher precedence)

sagikazarmark and others added 5 commits January 13, 2021 22:15
Updatating to group pages more clearly. Moving Developement section to end of list

Signed-off-by: Nate W <[email protected]>
Correcting layout so that "On this Page:" only appears when "toc" frontmatter variable is set to true

Signed-off-by: Nate W <[email protected]>
Signed-off-by: Mark Sagi-Kazar <[email protected]>
@sagikazarmark
Copy link
Member Author

I think this is ready to be merged. Further improvements can be done in additional PRs.

Copy link
Contributor

@nate-double-u nate-double-u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit, otherwise LGTM

@@ -0,0 +1,12 @@
---
title: "Development"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we may want to put a list of the development pages on this page. We could probably write a partial to build the list for us automatically.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

content/docs/development/_index.md Outdated Show resolved Hide resolved
Co-authored-by: Nate W. <[email protected]>
@sagikazarmark
Copy link
Member Author

Thanks for the review @nate-double-u

@sagikazarmark sagikazarmark merged commit dfe8852 into main Jan 14, 2021
@sagikazarmark sagikazarmark deleted the development-section branch January 14, 2021 08:46
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