Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jason Karns
    @jasonkarns
    @TravisTheTechie just created a PR for my refactor. #18
    i've been testing it on the lineman-docs site and testdouble blog and seems to be working as expected.
    the lineman-docs site is nice in that it is a site entirely composed of 'Pages' (there are no posts, archive, or feed)
    likewise, the testdouble blog is posts-only (and archive, index, feed). no pages
    If you don't mind, could you give this PR a run-through on your site? It doesn't add the relative-assets feature yet, but i want to test that there aren't any regressions
    Travis Smith
    @TravisTheTechie
    I'll give this a go for our site. Merging into my branch is going to be a pretty significant effort. I'll see what we can do though.
    Jason Karns
    @jasonkarns
    I've removed the deprecation warning changes from #18 so it's a pure refactor branch. merged to master
    Jason Karns
    @jasonkarns
    @TravisTheTechie I have a local spike that does the source file expansion by using grunt.task.normalizeMultiTaskFiles. This let's us use any of the standard grunt file configuration flavors while providing the full capability of flattening/not-flattening, and relative directory copying.
    in other words, don't expend any effort in merging your branch with master at this point. I think the feature we want could easily be done with much less code
    should be able to get my spike up by EOW to see if it meets your use case
    Travis Smith
    @TravisTheTechie
    I expected we would end with my branch trashed. I'll likely some more minor features to PR afterwards then.
    EOW = end of week?
    Jason Karns
    @jasonkarns
    @TravisTheTechie pushed src-config branch.
    it's not drastically different from latest master, but rather than doing any manual copying and whatnot it relies on 2 things
    the first is that is accepts a standard grunt-files config object as the value for paths.posts and paths.pages (currently only accepts the Compact-Format
    since it accepts the standard files config object, I can just pass it to grunt's task API to do the expansion (returns a full array of src/dest pairs with fully normalized pathnames, etc)
    using this config, we can properly configure grunt-markdown-blog to flatten or not flatten as desired.
    secondly, now that the posts and pages are being compiled and written in a standard way, either flattened or not, we can just use grunt-contrib-copy to copy over all non-markdown files from the posts/pages directories
    Jason Karns
    @jasonkarns
    grunt-contrib-copy is already included in lineman-blog, so all that's necessary is to configure the copy task with dev and dist targets
    here's a gist that includes two sample configurations from two different lineman-blog apps, each of which were running against the src-config branch of grunt-markdown-blog
    Travis Smith
    @TravisTheTechie
    Running "pages:dev" (pages) task
    generated/context.html generated from app/pages/articles/context.txt
    So something isn't right there. Also, I need copy tasks for both pages and posts, and I'm not yet sure how to configure that. But that might come soon. I have a few changes I'll open PRs for, such as striping index.html off the end of URLs. We also added categories, though I'm not sure we're 100% done with that.
    Travis Smith
    @TravisTheTechie
    Yeah, so it seems like I should be able to just apply an array to config.copy.dev, but when I do...
    Running "copy:dev" (copy) task
    Warning: Object #<Object> has no method 'indexOf' Use --force to continue.
    Via
    module.exports = (lineman) ->
      config:
        copy:
          dev: [
            {
              expand: true
              cwd: "app/pages"
              src: ["**", "!**/*.{md,us}"]
              dest: "generated"
              filter: "isFile"
              flatten: false
            },
            {
              expand: true
              cwd: "app/posts"
              src: ["**", "!**/*.{md,us}"]
              dest: "generated/blog"
              filter: "isFile"
              flatten: false
            }
          ]