DiscordDownload

Publishing a doc

This guide demonstrates how to publish a Moment doc to the public Internet as a web page. The shortest path to publish a Moment doc is two button clicks, but this guide will exercise some of the customization options that many users will find helpful or appealing.

Prerequisites

Before starting this guide, you should have the following:

A GitHub account. Moment currently only supports logging in with your GitHub account. If you do not have a GitHub account, you will be unable to create a Moment at this time.

A Moment doc to publish. If you don’t have one yet, you should start with the guide Create your first doc.

Create an account or log into the Moment service

Begin by navigating to a Moment doc you’d like to publish. Click the Share button in the upper-righthand corner.

If you haven’t created an account or logged into the Moment service, you will see a popover with a log in button:

Loading...

Click this button to log in via GitHub.

⚠️ Moment currently requires a GitHub account. If you do not have a GitHub account, you will not be able to use the Moment service at this time.

Publish the doc

Now that you’re logged in, click the Share button again. This time, you will see a button to Publish the doc:

Loading...

Some users will be interested to know specifically what clicking this button will do. Click the What will this do? button underneath the Publish the doc button. It will show you a plan resembling the following:

Loading...

All Moment docs are plain-old Markdown files, stored in a git repository, on your local device. In this plan, we can see that “publishing” is essentially (with some additional bookkeeping):

committing outstanding changes, and

pushing those changes to a remote at git.moment.dev.

Click the button to execute this plan. The UI will update as these steps are executed. It will look like the following:

Loading...

Once provisioned, the popover will look like this:

Loading...

Clicking the View site button takes you to the published site. In this case, the site looks like the following:

Loading...

(Optional) Customizing the site template

Once published, click the Share button again. Now, click the Customize template, style, permissions button:

Loading...

This will bring up the customization pane on the right-hand side:

Loading...

The second option allows you to select the customize template. Choose the template you’d like:

Loading...

If you change your selection, you will see the the bottom of the customization pane has updated to reflect that you have made changes that you need to commit and push to take effect:

Loading...

Click it to bring up the commit UI. Type a message describing your changes, like Change template to blog. Click the Sync to moment/main to publish the new changes.

⚠️ If this is your first time seeing the commit UI, you may wish to read the guide Committing changes.

Loading...

Refreshing the URL, you will see the site template has updated:

Loading...

Next steps

Congratulations! You have published a Moment doc as a web site. Any time you change the Moment doc, you can use the commit UI to synchronize you changes and publish a new version of the site.

For next steps, try the following:

Learn more about how Moment works