square-codeDevelop & Edit Travio

Use this section as your developer guide for local editing, building, testing, and packaging Travio.

Prerequisites

  • Ghost >= 6.0.0

  • Node.js (LTS recommended)

  • npm

  • A local Ghost install for testing


Install Dependencies

From theme root: npm install


Run in Development Mode (Watch + Live Reload)

npm run dev

What this does:

  • Starts Rollup in watch mode

  • Rebuilds CSS/JS on changes

  • Live-reloads on .hbs, CSS, and JS updates


Build Production Assets

npm run build

Outputs:

  • assets/built/index.css

  • assets/built/index.js

Use this before packaging or publishing.


Package Theme Zip

npm run zip

Creates: zip/travio.zip

This command also runs a production build and excludes dev-only folders (node_modules, .git, IDE folders, etc.).


Validate Theme Compatibility

npm run test

Runs Ghost GScan against the theme (after build) to catch compatibility issues.


  1. Edit templates/styles/scripts in source files

  2. Keep npm run dev running

  3. Test changes in local Ghost

  4. Run npm run build

  5. Run npm run test

  6. Run npm run zip

  7. Upload zip/travio.zip to Ghost


Important: Edit Source, Not Built Files

Edit:

  • assets/js/*

  • assets/css/*

  • *.hbs

  • partials/*

Do not manually edit:

  • assets/built/index.css

  • assets/built/index.js

Built files are generated and will be overwritten.


Key Files for Development

  • rollup.config.js — asset build pipeline

  • routes.yaml — custom route map

  • default.hbs — global layout + runtime config bootstrap

  • home.hbs, archive.hbs, videos.hbs, etc. — page templates

  • partials/ — reusable components

  • package.json — scripts, Ghost version, custom theme settings


Useful Command Summary

Last updated