Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Better partials #102

Merged
merged 12 commits into from
Apr 8, 2015
Merged

Better partials #102

merged 12 commits into from
Apr 8, 2015

Conversation

LukeAskew
Copy link
Member

The PR is a total rewrite of the templating engine inside of Fabricator.

  • allows user to define their own taxonomy; not tied to "components" and "structures". FYI these are called "materials"
  • adds support for feeding data into materials (components/structures/whatever)
  • adds support for multiple layouts
  • "notes" are now stored inside the material file (as front-matter), rather than in a separate .md file
  • remove support for material as "helper"; now they are "partials" so they can receive data

More detail can be found here: https://github.com/fbrctr/fabricator-assemble. These docs will be migrated into the main project once the PR is merged.
#100 #81 #69

@LukeAskew
Copy link
Member Author

Looking for feedback on this. Check out the branch and poke around.

@kennethillman
Copy link

I took it for quick spinn this morning and must say it was smooth.
Love the new easy way to make your own taxonomy and layouts (includes, looping any material as you want). Feeding data into materials is a very nice feature and to store notes inside the files is a big plus, reduces amount of files.

Will play some more with this branch during the coming week.
And as i said no issues at all my initial test round.

Keep up the good work Luke!

Conflicts:
	src/toolkit/views/partials/menu.html
	src/views/layouts/includes/f-icons.html
	tasks/collate.js
@LukeAskew LukeAskew added this to the 1.0 milestone Mar 18, 2015
This was referenced Mar 18, 2015
material variations can be grouped in subdirs; update item listing UI to accomodated item groupings
@LukeAskew
Copy link
Member Author

Added support for grouping materials (components/structures/whatever).

For instance, if you have:

├── materials
│   ├── components
│   │   ├── buttons
│   │   │   └── primary.html
│   │   │   └── secondary.html
│   │   └── checkbox.html

"Buttons" will appear in the sidebar menu, but "primary" and "secondary" will not.

When you navigate to the Components listing page, the "primary" and "secondary" button variations are grouped under the "Buttons" heading.

You can access the partial using dot notation {{> buttons.primary}} {{> buttons.secondary}}

@LukeAskew
Copy link
Member Author

Added support for user-defined helpers. Defined as key:val pairs in the options.helpers passed into the assemble() task, see here with the helper-markdown helper:

gulp.task('assemble', function (done) {
    assemble({
        helpers: {
            markdown: require('helper-markdown')
        }
    });
    done();
});
{{#markdown}}
# Heading

> this is markdown

foo bar baz
{{/markdown}}

@LukeAskew LukeAskew merged commit d910de7 into master Apr 8, 2015
@LukeAskew LukeAskew deleted the better-partials branch April 8, 2015 15:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants