This projects creates bespoke ads that fit perfectly on The Guardian, known as “native” in Google Ad Manager parlance.
Aiming to provide a great developer and reader experience, this project uses Svelte to build the template, and SvelteKit to help preview development. You can see the current templates on guardian.github.io/commercial-templates.
This project is a rewrite and work-in-progress. Legacy templates can still be
found in the /legacy
folder
Once you've created a project and installed dependencies by running yarn
,
start a development server:
yarn dev
# or start the server and open the app in a new browser tab
yarn dev --open
When you change templates or shared components, the components will
reload automatically. Read more about Svelte templates in src/templates/
Deploying is done via building the project using the static adapter, and then
pushing the build
folder to the gh-pages
branch.
yarn deploy
You can build the app by running
yarn build
and then preview it withyarn preview
, regardless of whether you installed an adapter. This should not be used to serve your app in production.