Best Practices
Theming guidelines worth following.
Listed below are a couple of things we’ve found to be a good idea when building a theme.
- Name your main CSS and JavaScript files the same name as your theme
- Template and layout files should have
.html
extensions - Only put image files pertaining to your theme in your theme directory; content-related imagery should go the
assets
folder to properly maintain separation of content from style - Create as many templates and subdirectories as you’d like
- Use relative paths in your CSS files, for example:
url(../img/bg.png);
- Use lowercase filenames
- When sharing, distributing, or selling a theme, feel free to include a directory for
_content
showing sample posts and pages that use your theme’s templates, etc.