Live CockpitCMS+Svelte Projects:
1. Folder Hierarchy
Main Folders
| Folder | Reason for Existence |
|---|---|
| _zdroje | Source files for graphic design of the page (PSD, AI, ...) |
| node_modules | NPM packages (managed via npm install and npm uninstall) The Svelte compiler is stored here including all dependencies and other things. All important things that should be accessed are listed in package.json. Better not to touch manually. |
| public | Folder whose content should be on the webserver. Compiled Svelte implementation for the end user + entire local version of CockpitCMS and a few things related to it (documentation, ...). |
| src | Source Svelte files. The root is App.svelte |
| src_docs | This mkdocs documentation |
Further Division
Svelte Division (src)
| Folder | Reason for Existence |
|---|---|
| _js | External JS files that are compiled into separate files outside the main implementation (specifically into the public/js folder). The main part of the implementation (public/bundle) loads/reads them from time to time for occasional needs. |
| parts | Parts of the page that are not editable as components in CockpitCMS and are loaded directly in App.svelte |
| routes | Custom router (system for changing preloaded pages without refreshing) and other relevant things related to the implementation of path/location on the page. |
| scripts | All functions that are used in various places multiple times and to avoid being copied around are summarized here. Unlike _js, they will be compiled as a direct part of the main implementation |
| sections | Individual components that the CockpitCMS editor can add/remove and edit their values within pages. They are loaded into the main part of the application App.svelte via Layout.svelte |
In some folders there is an excluded folder, which indicates that the given files are currently unused and out of access (often have bugs, are not available in CockpitCMS for the editor).
Public Section Division (public)
| Folder | Reason for Existence |
|---|---|
| api | Not yet published StrukShop API concept for logging in website users, as the existing CockpitCMS API is insufficient. |
| build | Compiled main Svelte program of the page loaded via index.html |
| cockpit | Cockpit-CMS and all its parts, addons, etc. |
| cockpit-docs | Additional external documentation for Cockpit-CMS. Used mainly as a reference for field-types, or API |
| cockpit-docs-official | Official (rather insufficient) documentation for Cockpit-CMS. |
| font, img | Images and fonts that the website user cannot edit (e.g. textures and font for special theme, loading animation, ...) |
| js | Compiled external self-executing functions from src/_js, or completely external libraries (FontAwesome, BrowserUpdate) |
Languages
Supported languages are separately defined in App.svelte, public/index.php, public/sitemap.php and cockpit/config/config.yaml, where within CockpitCMS and its API the language "sk" is considered "default".
Previous: 0. Basic CockpitCMS+Svelte Orientation
Next: 2. CockpitCMS Administration