> For the complete documentation index, see [llms.txt](https://docs.themeupstudio.com/travio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.themeupstudio.com/travio/development/develop-and-edit-travio.md).

# Develop & 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.

***

### Local Workflow (Recommended)

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

```bash
npm install     # install dependencies
npm run dev     # watch mode + live reload
npm run build   # production build
npm run test    # gscan compatibility check
npm run zip     # build + package zip/travio.zip
```
