-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Welcome to the StaticSite wiki!
The architecture will be such that all files may be registered with a "type" which will determine how it is handled in the system. There will be many included plugins which we won't even call plugins, but they will work the same as add-on plugins. We need a way to specify what a file's "type" is. If we store it as metadata on the S3 object then we'll need to call HEAD on every object in the bucket to determine its type (which will determine its icon and behavior). This seems like the best plan even though the initial load will take longer.
Each file type will have optional display renderers and optional editors. Images can be displayed similar to how they are in Chrome devtools. HTML can have a display to show the page as well as an editor. JavaScript and CSS will just have the editor. CoffeeScript and Less/Saas may have an editor that produces the compiled version of the file when saved. Settings files may have an editor for site-wide settings and section-specific settings. E.g. a blog may have settings specific to it.
Each file type may determine what parent type it may be created in, and what children types it will allow. This will determine what populates the New dropdown. A blog post may only be created inside a blog parent type. A blog will not allow anything but blog posts to be created inside of it. But perhaps a blog post may allow children so that attachements, images, and other resources for the post may stay associated with it.
Using a pluggable architecture will make it easier to compartmentalize mentally the features and to add new functionality bit by bit.
TODO
-
Auto-load all file metadata using the HEAD requestDone, with caching to localStorage - Create an API for adding file/folder types.
- API for storing limited metadata
- Allowing read-only "partner" files for a file-type, e.g. the compiled version of your CoffeeScript file
- Limiting what "New..." options are available for each folder-type
- Specifying the actions allowed on provided file types, e.g. disallow blog/settings.json to be deleted or renamed
- Default files created when plugin is first installed (may check each time). E.g. admin/templates/ folder for templated HTML