Deploying a Homepage Template¶
When we "deploy" a homepage template, we take the local files in a project directory and send them to a Socrata domain where they will be used to render the homepage.
This guide will show you how to deploying a homepage template project.
Check .marble_default file¶
Every Marble project directory should include a .marble_default file at its root level. This file contains a single line specifying the relative filepath for the default Marble configuration file to use when deploying the project. For example, your .marble_default file might contain the following:
./site_configs/staging.marble.yml
Be sure this filepath points to the appropriate Marble config file, as Marble will use that file when deploying the homepage.
Upload datasets¶
Using your terminal, execute the following command from within your project directory:
marble populate
This will upload homepage configuration dataset (and their associated images) from your local project to the specified Socrata domain. After the populate command finishes executing, you can inspect your Marble configuration file (the one specified in .marble_default) to see the dataset identifiers.
Upload site code¶
Next, execute the following command in your terminal:
npm run deploy
This command bundles and uploads the various homepage contents, including CSS, JS, and YAML/JSON files. (Under the hood, npm run deploy calls a number of other npm and marble commands.)
Once this process completes, open a browser and go to the Socrata domain. The homepage should be updated. (You may need to refresh the homepage if you've already got it open in a browser tab.)
Congrats! You have successfully deployed a homepage template!