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

Recursively flatten the order.yml file in order to support deeper content nesting. Resolves #25 #27

Closed
wants to merge 2 commits into from

Conversation

ajpiano
Copy link
Member

@ajpiano ajpiano commented Nov 22, 2012

Still need to handle the theming end of this for the learn site (jquery/jquery-wp-content/issues/128) but this does the trick in terms of processing the order.yml and providing a linear order for the content for arbitrary levels of nesting.

if ( grunt.utils._.isObject( chapter ) ) {
title = Object.keys( chapter )[ 0 ];
map[ title ] = ++index;
function flatten(item, folder) {
Copy link
Member

Choose a reason for hiding this comment

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

I can point out whitespace issues though! function flatten( item, folder ) {

@ajpiano
Copy link
Member Author

ajpiano commented Nov 28, 2012

Obviated by the build-pages-preprocess hook added in 0.6 by @scottgonzalez. Will be addressed in learn site gruntfile directly.

@ajpiano ajpiano closed this Nov 28, 2012
@scottgonzalez scottgonzalez deleted the 25-recursive-order branch December 5, 2014 16: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.

None yet

2 participants