Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Help: customize directories + rendering #625

Open
Zearin opened this Issue · 9 comments

4 participants

@Zearin

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. :smile:)


How do I do that?


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

@greduan
Owner

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.»
@Delapouite

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

@Zearin

What do you need this for?

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

I want content in documents/ totally separate from code.

@Zearin

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

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

@balupton
Owner

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

@Zearin

@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.»
@balupton
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.

@Zearin

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! :wink:)


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”.

@Zearin

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
Something went wrong with that request. Please try again.