> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allgoodhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Editing a landing page's code

> Open a landing page's HTML, change it by hand or upload a file, check it, and save it as a new version.

Most pages never need this. You describe a change to Mary, and she makes it. **Edit Source** is for the times you want to change the page's code yourself, such as adjusting spacing, fixing a layout problem, or pasting in markup you already have.

A landing page is one HTML file, and Edit Source lets you change it.

> [!NOTE]
>
> Changing the words on a page is not always a code edit. If the page was made from a template, its words live in a separate copy document. Ask Mary to change the copy rather than typing over the code, so the change is easy to track. There's no editor for a copy document yet.

## Open the code

Open the page and select **Edit Source** in the left menu, under **Author**. It works the same way as Edit Source for an email. See [Editing an email's code](https://docs.allgoodhq.com/mk/content/email/emails/editing-the-code.md).

The screen says it's for writing the page's `index.html` by hand, and that saving creates a new version. You see the file with line numbers, and **Upload a file**, **Save** and **Save and publish** at the top. **Save** and **Save and publish** stay off until you change something. If you don't have permission to edit pages, the screen opens read-only.

![The Edit Source screen for a landing page, showing index.html with line numbers and the Upload a file, Save and Save and publish buttons](https://mintcdn.com/allgoodtechnologyinc/2ryIb32Og_H3zeEk/images/mk/content/landing-pages/edit-source-editor.png?fit=max\&auto=format\&n=2ryIb32Og_H3zeEk\&q=85\&s=481a7a6043e6912e6e0b7a6505933006)

Edit Source shows the page's index.html, with Upload a file, Save and Save and publish above it

## Make a change

**1. Edit the HTML**

Type in the editor, or select **Upload a file** to replace the code with an HTML file from your computer. Uploading fills the editor but doesn't save anything yet.

**2. Read the check**

The message above the editor checks your code as you edit. If it finds a problem, it lists what to fix, and you can't save until it's fixed. Before you've changed anything it reads "Edit the source to check it."

**3. Save it**

Select **Save** to keep your change as a new version without putting it live. Select **Save and publish** to save and publish in one step. Both stay off until you've changed something, and **Save and publish** needs permission to publish.

When this works, a message confirms the new version, such as "Saved as v4. Publish it to go live."

## What happens to the live page

Nothing changes on a live page when you save. It keeps serving its last published version until you publish the new one. Every save is its own version, so you can try a change and go back. See [Publishing and versions](https://docs.allgoodhq.com/mk/content/approvals.md).

A page is served exactly as you write it. Unlike an email, there is no build step.

## Good to know

* **Leave the `{{ }}` references in place.** Where the page uses its copy document or its form, the code holds a reference such as `{{ asset.signup.formId }}`. If you type words over a reference, that part no longer follows the copy document.
* **Keep the form's markers.** A form on the page is connected through attributes in its markup. If you remove them, the form stops capturing. See [Adding a form to a page](https://docs.allgoodhq.com/mk/content/forms/adding-a-form-to-a-page.md).
* **Components can't be edited by hand.** If the page was built from a [page component library](https://docs.allgoodhq.com/mk/content/landing-pages/page-components.md), each section is checked against its block when you save. A change that no longer matches a block's shape is refused.
* **Your own scripts run as written.** Tags you paste in, such as analytics or ad pixels, aren't covered by allGood's consent settings. See [Landing pages FAQ](https://docs.allgoodhq.com/mk/content/landing-pages/faq.md).

If you get stuck, contact [support@allgoodhq.com](mailto:support@allgoodhq.com).

## Related articles

* [Editing an email's code](https://docs.allgoodhq.com/mk/content/email/emails/editing-the-code.md)
* [Page components](https://docs.allgoodhq.com/mk/content/landing-pages/page-components.md)
* [Publishing a landing page](https://docs.allgoodhq.com/mk/content/landing-pages/publishing-a-landing-page.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.