We recommend that the first thing you do once you have created a new site is import your assets.
- via the Siteglide CLI
- via the Admin CMS/ File Manager
Preparing Your Assets Folder:
Many sites have images and other assets stored in multiple file locations. Even if when building the site, your developers stored all the files in a structured way. Clients often don’t realise this and upload new assets in other locations over time. We’ll need to tidy this up a bit before importing to the Siteglide Platform.
There are four folders automatically created for you on a new site: Images, Documents, CSS and JS. You can access each of these within File Manager. Therefore we want to match this when cleaning up our assets.
If you have a more complex bespoke project that absolutely requires files to be stored on the root, then get in touch and let us know. We’ll be happy to assist.
Uploading Your Assets
If you have a very large number of assets to upload (especially large images or videos), the best way to upload is via the Siteglide CLI.
In order to do this: you'll need to follow these steps. Where a step has a placeholder like
<env>, add in your own environment, for example
1) First follow this tutorial to set up siteglide-cli, including adding an environment.
2) Create a new folder for your project if you've not already got one.
3) Change directory to that folder with the terminal command
4) Run the terminal command
siteglide-cli pull <env> . When prompted to, type a capital "Y" to confirm.
You will now have the Site stored in your new Project folder. On the root, level, you'll see a root folder called
5) Prepare your folder structure as detailed above with 4 folders: images, js, css and documents. You can prepare this anywhere- except in your new project folder.
6) In your new Project folder, make sure the counterpart versions of these folders exist inside
marketplace_builder/assets/ - by default after a pull, only a css and js folder will be shown. If needed, create an
images and a
documents folder here.
7) Run the terminal command
siteglide-cli sync <env> -d This watches your marketplace_builder folder for changes and will upload or update any files which arrive or are edited respectively.
8) Copy and paste the contents of each folder in your export into the counterpart folder in your new project folder.
9) For each file that is added, sync will recognise a change and sync the file. You'll see a green confirmation on the CLI.
10) Check your assets have arrived successfully on Admin by navigating to CMS/File Manager and checking each of the four tabs.
Please get in touch with us in the live-chat if you need help setting this up, or report a bug on the Forum if any of your files failed to sync.
Using File Manager to Upload Assets
File Manager currently allows you to bulk upload up to around 100 small files at a time. This is a great alternative to CLI for day-to-day use. You can create folders and upload assets within each as you go.
However, there are browser limitations over how much can be uploaded at once, so we still recommend you use Siteglide-CLI for bulk upload and for migrations.
Outputting your Assets
Assets are stored and accessed a bit differently on our platform compared to BC. We do this to receive various benefits, check out our doc on Assets to find out more.