-
Notifications
You must be signed in to change notification settings - Fork 1
CSS API
Jack Haystead edited this page Mar 6, 2022
·
1 revision
For a site that doesn't have it's own repository, the CSS API can be used via core-template to store custom styles.
To GET an existing CSS file for a site, follow these steps:
- Pull the latest version of core-template.
- Change the
siteUrlinkibble.jsonto your site's URL. - Run
npm run css:local:get. This script will obtain the latest stored CSS file for your site and place it insite/static/styles/local.css. - In
site/templates/application/application.jet, uncomment thelocal.cssfilename assignment line to be able to run the site with your local css file.
To PUT a new or modified CSS file for a site, follow these steps:
- Pull the latest version of core-template.
- Change the
siteUrlinkibble.jsonto your site's URL. - Add a file called
local.cssto thesite/static/stylesdirectory and write some CSS inside it. Alternatively, run the GET script to obtain the latest stored CSS file and modify some CSS inside it. - Run the site locally to test your CSS.
- Run
npm run css:local:putto upload yourlocal.cssfile to the API. You will be asked to enter an admin email address and password.