This repo contains a working static website written with Hugo, integrated with content coming from this DatoCMS administrative area.
First, install the dependencies of this project:
yarn install
Add an .env
file containing the read-only API token of your DatoCMS site:
echo 'DATO_API_TOKEN=abc123' >> .env
Then, to run this website in development mode (with live-reload):
yarn start
To build the final, production ready static website:
yarn build
The final result will be saved in the public
directory.
To convert the content stored on DatoCMS into local Markdown files that can be digested by Hugo, the datocms-client plugin requires an explicit mapping file called dato.config.js
. You can read more about the commands available in this file in the official documentation.