Web-Developer's Project Template Directory

后端 未结 11 1265
予麋鹿
予麋鹿 2021-01-30 03:18

IMPORTANT: The accepted answer was accepted post-bounty, not necessarily because I felt it was the best answer.


I find myself doing things over an

11条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 04:04

    I have been using the following setup for a while now with great results:

    • /site: This is where my actual working website will live. I'll install my CMS or platform in this directory after the templates are created.
      • .htaccess (basic tweaks I usually find myself enabling anyway)
      • robots.txt (so I don't forget to disallow items like /admin later)
    • /source: Contains any comps, notes, documents, specifications, etc.

    • /templates: Start here! Create all static templates that will eventually need to be ported into the CMS or framework of /site.

      • /behavior
        • global.js (site-specific code; may be broken out into multiple files as needed)
      • /media: Images, downloadable files, etc. Organized as necessary

      • /style: I prefer modular CSS development so I normally end up with many stylesheet for each unique section of the website. This is cleaned up greatly with Blender - I highly recommend this tool!

        • behavior.css (any styling that requires a JS-enabled browser)
        • print.css (this eventually gets blended, so use @media print)
        • reset.css (Eric Meyer's)
        • screen.css (for @media screen, handheld)
      • /vendor: all 3rd party code (jQuery, shadowbox, etc.)

      • Blendfile.yaml (for Blender; see above)

      • template.html (basic starting template; can be copied and renamed for each unique template)

提交回复
热议问题