The web can be weird and temperamental. This is especially true with regard to how it handles the names of things living within it. Here’s a guide on naming your Cascade assets so that the web deities stay happy.
A quick cheat sheet
Asset type | Special characters | Spaces | Capital letters |
---|---|---|---|
Pages | Only dashes and underscores | No | No |
Folders | Only dashes and underscores | No | No |
Files | Only dashes and underscores | No | Mostly no, sometimes ok. |
Non-publishable assets | Only dashes and underscores | Ok | Ok |
Pages and folders
Keep names to lowercase basic latin characters, numbers, dashes, and underscores only. Character with diacritics (i.e., accents and such) are risky. Some browsers may handle uncommon characters gracefully, but results are not guaranteed.
If your page or folder name includes spaces, it best to replace those with dashes. Underscores technically work to, but in some scenarios aren’t as readable as dashes (think underlined names).
Files
Generally the rules that apply to pages and folders also apply to files. However, some file types are best served with camel casing – beginning each word in a name, except the first, with a capital letter.
// camel casing example myFileName.js
The use of camel casing is generally file naming convention used by programmers / developers, so if you don’t normally do it, don’t start…. just stick to the rules for pages and folders.
All non-publishable assets
Anything that exclusively lives in Cascade and is never published to the web, including non-publishable files and folders, can safely have nice human-readable names….
Spaces? Ok!
Capital letters? Sounds great!
Special characters? Woah, let’s not get crazy here. (That’s a no.)