Email or username:

Password:

Forgot your password?
Top-level
Zach Leatherman :11ty:

anyway, here’s Eleventy’s version in two commands:

echo '# Page header' > index.md
npx @11ty/eleventy

and the output is `<h1>Page header</h1>`

11 comments
Random Geek

@zachleat thanks for doing your part to keep honest to god web site building alive

Zach Leatherman :11ty:

@randomgeek I like building web sites and I would like to keep doing it more please 😅

Evan B🥥ehs

@zachleat @randomgeek I didn't make the website, the website made me

Mayank

@zachleat this actually makes me wonder: should .md be processed by default?

it's certainly great for blog posts, but maybe not a good default for a general purpose static site generator? it also requires excluding README.md (and other top-level *.md) from being built

Zach Leatherman :11ty:

@hi_mayank yeah—a fair question! I’ve hit this a few times too as I slowly gravitate towards recommending using a `content` or `src` folder by default.

I think the benefits outweigh the negatives though—the onramp with immediate markdown support is hard to beat. We couldn’t do a default `content`/`src` folder either because that would require an additional folder creation step or even head towards a boilerplate CLI which I have a real hard time getting onboard with.

Mayank

@zachleat maybe not a `src` folder but a `pages` folder that's a different thing from the input dir.

everything (including *.MD) inside `pages` could generate an .html file, and everything outside will still be considered by 11ty but not used as pages.

onboarding:
$ touch pages/index.html
$ npx @11ty/eleventy

Zach Leatherman :11ty:

@hi_mayank I like `pages`! How you describe `pages` is exactly how the input folder operates! You can change your input folder to be anything, currently:

Onboarding:

$ touch pages/index.html
$ npx @11ty/eleventy --input=pages

I wonder if this would be a better thing to try out in our quickstart!

Mayank

@zachleat in my mind, the difference between `pages` and `input` is that the includes and layouts are currently relative to the input folder and default to being inside of it. (the `_` prefix certainly helps tho)

also i should have tried `touch pages/index.html` before posting. 🤦 it needs to be `mkdir pages && touch pages/index.html`

Mu-An

@zachleat where does a template(+/static css/assets) get factored in in this command? I thought it was more complicated than that the last time I tried to use it.

Zach Leatherman :11ty:

@muan markdown files are preprocessed with liquid by default

Go Up