Your first edit
Change a file in a working copy, preview it on the real site and publish it, step by step.
On this page
This walkthrough changes a file in your theme and publishes it. Nothing reaches visitors until the last step.
1. Open the theme#
- Go to Temper › Themes & Plugins.
- On the Themes tab, click your theme.
The editor opens. The toolbar shows the theme's name, with a dot for its state, and next to it "Matches the installed version". Temper has made a working copy, and you're editing that.
2. Open a file#
Click a file in the file list on the left, or press ⌘P on a Mac or Ctrl+P elsewhere and type part of its name. In a block theme, try parts/header.html or a pattern in patterns/.
3. Make a change and save#
- Change something small, such as a heading's text.
- Press ⌘S or Ctrl+S.
Temper checks the file and saves it to the working copy. The status bar under the code says "Saved to working copy", and "✓ Save checks pass" when the file is clean. If the file has an error, it isn't saved: the error is marked on its line, and the status bar shows it. Fix it and save again.
The toolbar now says "1 unpublished change", and the Changes tab on the right lists the file with an M for modified.
4. Preview it#
Click the eye icon at the right of the toolbar ("Show a live preview of the open file"). The preview pane opens beside the code and shows your site with the working copy in place. For a template, template part, pattern or block, it can show that piece on its own (File) or the whole page (Site).
To browse the whole site with your changes, click View site in the toolbar. It opens a new tab. Only you see the change; visitors and other users still get the live theme.
5. Compare with live#
In the Changes tab, click the file. Temper compares it with the live version: red lines are live, green lines are your working copy. Click Back to editing to return.
6. Publish#
- Click Publish in the toolbar.
- The dialog lists the checks: how many files changed, whether every changed file passes the save checks, and whether you've previewed the latest changes.
- Type a short Message, such as "New header text".
- Click Publish.
Temper swaps your working copy in. Because this is the active theme, it loads the home page before and after; if the page worked before and shows an error after, it puts the previous version back at once and tells you the error with its file and line.
7. Undo it, if you want#
Open the History tab. Under Snapshots, the version your publish replaced is listed as Before "New header text". Click Restore to put it back. Your working copy keeps your change, so it shows as an unpublished change again.
Next#
- The editor covers the file list, tabs and shortcuts.
- Starters add blocks, patterns and templates with the wiring done.