Help: customize directories + rendering #625

Open
Zearin opened this Issue Aug 30, 2013 · 9 comments

Projects

None yet

4 participants

@Zearin
Member
Zearin commented Aug 30, 2013

I’d like a slightly different layout than DocPad’s default. Rather than this:

- src/
    - documents/
        - styles/
        - scripts/
        - index.html.md
        - «etc.»

I’d like this:

- src/
    - styles/               # renders to out/styles
    - scripts/              # renders to out/scripts
    - documents/            # renders to out/
        - index.html.md
        - «etc.»

But I still want css/ and js/ to render as their own directories under out/—just as they used to.

(In other words, I want content in documents/ totally separate from code. 😄)


How do I do that?


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

Contributor
greduan commented Aug 30, 2013

What do you need this for? Do you need a documents/ folder in your website's out?

If that's the case you can just have the following hierarchy:

- src/
    - documents/
        - index.html.md
        - documents/
            - «etc.»
        - styles/
            - «etc.»
        - scripts/
            - «etc.»
        - «etc.»
Member

Did you try symlinks? I don't remember if the dir scanner follows them.

Member
Zearin commented Sep 3, 2013

What do you need this for?

At the end of my original, post, I said:

I want content in documents/ totally separate from code.

Member
Zearin commented Sep 3, 2013

Did you try symlinks? I don't remember if the dir scanner follows them.

Symlinks aren’t quite what I’m looking for…

Owner
balupton commented Sep 3, 2013

Can you update your original post with where you want example files to go once rendered? That will help me understand, thanks!

Member
Zearin commented Sep 10, 2013

@balupton Sorry for the delay! I’ve updated the original post.

For convenience, here it is again:


Rather than this:

- src/
    - documents/
        - styles/
        - scripts/
        - index.html.md
        - «etc.»

I’d like this:

- src/
    - styles/               # renders to out/styles
    - scripts/              # renders to out/scripts
    - documents/            # renders to out/
        - index.html.md
        - «etc.»
Owner

Yeah, I think we understand what you're after, but we don't understand why, therefore we can't recommend the best approach for accomplishing what you're after without knowing why you're after such a thing.

Member
Zearin commented Sep 12, 2013

Yeah, I think we understand what you're after, but we don't understand why, therefore we can't recommend the best approach for accomplishing what you're after without knowing why you're after such a thing.

The reason I want this organization scheme is so that there’s a single directory dedicated to all the site’s content.

I should be able to hand one subdirectory to someone who doesn’t know how to program, and have 100% of the site content contained within it. They shouldn’t have any CSS or JS (or preprocessor equivalents) in their way.

(A little template code in the content is fine. I’m talking about files that 100%—or very nearly—styles or client-side scripts.)


That’s the main reason, anyway.

Besides that, this sort or file organization is way simpler for my brain to deal with. While I can do both code and content at once, my brain tends to get into a mode that leans towards one or the other. It takes mental energy to shift between the modes.

With a directory containing a mix of code and content, the signal-to-noise ratio suffers…and so does my work efficiency on the (DocPad) project.


Is that enough info? (If the setup is, in fact, possible, I’m anxious to start using it! 😉)


Edits:
1. Rephrased the first sentence for clarity.
2. Formatting tweaks & further rephrasing (throughout).
3. Added clarification on “template code” in content vs. “code files”.

Member
Zearin commented Sep 26, 2013

Yeah, I think we understand what you're after, but we don't understand why, therefore we can't recommend the best approach for accomplishing what you're after without knowing why you're after such a thing.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment