Custom assets for Core CMS projects
Tip
To customize a Core CMS project beyond assets, create a repository via Core CMS Template.
Caution
Read Gotchas before you change a file path.
- Related Repositories
- Project Architecture
- Gotchas
- Create Project
- Asset Management
- Build Project
- Deploy Project
- Port Project
- Upgrade Project
- Camino, a Docker container-based deployment scheme
- Core CMS, the base CMS code for TACC WMA CMS Websites
- Core CMS Template, a template for creating new TACC WMA CMS projects
- Core Portal, the base Portal code for TACC WMA CMS Websites
- Core Styles, the shared UI pattern code for TACC WMA CMS Websites
- Core CMS Resources, the old solution for extensions of the Core CMS project
- Core Portal Deployments, private repository that facilitates deployments of Core Portal images via Camino and Jenkins
Each project has its own root directory. Read STRUCTURE.md for internal directory layout and file naming or example_assets for a template.
Renaming or moving a file breaks the CDN URL referenced in Core Portal Deployments. If you change a file path, update Core Portal Deployments to match, because it reads this main branch. If you do not have access to Core Portal Deployments, then maybe do not change a file path — ask first.
See Save Snippets.
Some projects have their own package.json and build script. See Custom Styles.
- Duplicate & Rename the example_assets directory.
- Add your assets into that directory.
- Get paths to those assets via a CDN.
- Find the project in Core Portal Deployments.
- Set those paths in its CMS settings file (example).
Changes only header on both CMS pages and Portal interface.
-
Upload logo to folder (example).
-
In Core Portal Deployments,
set path to that logo via CDN (example). -
Deploy the change.
These will load on every page.
Important
Some projects (e.g. ecep, frontera) compile their CSS via their own package.json. If both a .css and .postcss exist with the same name, then edit the .postcss file and — before you commit — run npm run build.
-
Upload CSS to folder. Examples:
-
In Core Portal Deployments,
set path(s) to stylesheet(s) via CDN. Examples: -
Deploy the change.
Important
Snippets are not loaded by the CMS from here nor a CDN. They are maintained independently in the CMS admin interface. This folder just lets us version control them.
-
Upload snippet(s) to folder (example).
-
In the CMS admin interface:
document the latest commit of each snippet (examples) e.g.- Name:
Page: Members: JS (last commit: 2bcadc0) - Name:
Page: Members: CSS (TACC/Core-CMS-Custom#321)
- Name:
Follow Core CMS: Build & Deploy Project.
Follow "Deploy" section of How To Build & Deploy.
To port a project from Core CMS Resources, read Port Project.
To upgrade the Core CMS of an existing project:
- Update its CMS image tag in Core Portal Deployments (example).