sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 343 forks source link

Docs Improvement: Anatomy of a typical Harp application #338

Closed hced closed 10 years ago

hced commented 10 years ago

Here's the current state of the Documentation → The Rules → Anatomy of a typical Harp application:

Anatomy of a typical Harp application
 myapp.harp.io/                <-- root of your application
   |- harp.json                <-- configuration, globals goes here.
   +- public/                  <-- your application assets belong in the public dir
      |- _layout.jade          <-- optional layout file
      |- index.jade            <-- must have an index.html or index.jade file
      |- _shared/              <-- arbitrary directory for shared partials
      |   +- nav.jade          <-- a partial for navigation
      +- articles/             <-- pages in here will have "/articles/" in URL
          |- _data.json        <-- articles metadata goes here
          +- hello-world.jade  <-- must have an index.html or index.jade file

I find the last line of explanation to be a bit vague:

+- hello-world.jade  <-- must have an index.html or index.jade file

The example shows a custom-named html/jade file (hello-world.jade), whereas the explanation states that there must be an index .html or .jade file.

Maybe it's too early in the morning for me, but to me it doesn't look self explanatory whether a fixed name (index) is required or not. Especially seeing that there's an index.jade file in the public/ dir, which I believe has to be explicitly named index, right?

Perhaps something like this might eliminate any confusion?

+- hello-world.jade  <-- must have at least one *.html or *.jade file
hced commented 10 years ago

Deleting this issue – sent a pull request with suggested amendment: https://github.com/harp/harpjs.com/pull/9/files