Skip to content

Write and publish entries

These are the steps to write an entry in the admin and publish it. This page also explains operations such as keeping an entry saved as a draft, publishing at a set date and time (scheduled publishing), unpublishing, and going back to a previous revision.

  • To write entries, you need a role that allows the [作成](Create) or [編集](Edit) operation on that content type. To publish, you also need the [公開](Publish) operation. Among the built-in roles, [オーナー](Owner), [管理者](Admin), and [編集者](Editor) can do all operations. [閲覧者](Viewer) can only view
  • Create the content type and fields first (Create content types)

An entry has the following 4 states. The state appears in the [ステータス](Status) column of the list and at the top of the edit screen.

State Meaning Can you get it with the Content API?
[下書き](Draft) Never published yet No (except preview)
[公開中](Published) Published Yes
[公開中(下書きあり)](Published (with draft)) There is an unpublished draft separate from the published revision You get the published revision
[公開終了](Unpublished) Publishing stopped No (except preview)

If you edit a published entry and click [下書き保存](Save draft), the published revision does not change. When you click [公開](Publish), the draft becomes the published revision.

To write and publish an entry, do the following.

  1. In the left menu, click the name of the content type. The entry list appears.
  2. Click [新規作成](New).
  3. Enter values in each field.
  4. (Optional) Under [情報](Info) on the right, enter an ID in [エントリー ID(省略すると自動で付ける)](Entry ID (assigned automatically if omitted)) (for example, “hello”). Up to 50 characters of letters, digits, _, and -. The ID goes into the Content API URL (/api/v1/content/posts/hello).
  5. Click [公開](Publish).

“公開しました” (Published) is shown, and the state at the top of the edit screen becomes [公開中](Published).

If you don’t want to publish yet, click [下書き保存](Save draft) in step 5. “保存しました” (Saved) is shown, and the state becomes [下書き](Draft). You can also save a draft with ⌘S (Ctrl+S on Windows).

When the content type is a single, clicking its name in the left menu opens the edit screen of that entry directly. Single entries have no ID.

If you cannot save, “入力内容を確認してください” (Check your input) is shown, and the reason appears below each field that doesn’t meet the rules.

  • [下書き保存](Save draft) does not check [必須](Required), minimum length, or minimum count. You can save unfinished work
  • [公開](Publish) checks all rules
  1. In the entry list, click the title of the entry you want to fix.
  2. Fix the values.
  3. Click [公開](Publish).

The fixed values are published immediately. If you want to check before publishing, click [下書き保存](Save draft). The state becomes [公開中(下書きあり)](Published (with draft)), and the published revision stays as it is. After you check the draft, click [公開].

How to check a draft with the Content API is in Read drafts (preview). Under [情報](Info) on the right of the edit screen, [下書きを取得する URL(プレビュー)](URL to get the draft (preview)) shows the URL that gets that entry’s draft.

To discard the draft of a published entry and go back to the published revision, do the following.

  1. Click […](more actions) in the upper right of the edit screen.
  2. Click [下書きを破棄](Discard draft).
  3. On the confirmation screen, click [下書きを破棄] again.

“下書きを破棄しました” (Draft discarded) is shown, and the input fields return to the values of the published revision. [下書きを破棄] does not appear for an entry that has never been published. If you don’t need it, delete the entry.

Publish at a set date and time (scheduled publishing)

Section titled “Publish at a set date and time (scheduled publishing)”

You can schedule an entry to be published, or unpublished, at a set date and time. To schedule, save the entry once first.

  1. Enter values on the edit screen and click [下書き保存](Save draft).
  2. Under [予約](Schedule) on the right, enter the publish date and time in [予約公開](Scheduled publish).
  3. (Optional) In [予約公開終了](Scheduled unpublish), enter the date and time to unpublish.
  4. Click [予約を保存](Save schedule).

“予約を保存しました” (Schedule saved) is shown, and a [予約あり](Scheduled) mark appears at the top of the edit screen and in the list. Hover over the clock icon in the list to see the scheduled dates and times.

  • Enter dates and times in your browser’s time zone. The time zone is shown in the [予約] box
  • Use a date and time later than now and within 1 year. If you enter both, [予約公開] must be earlier than [予約公開終了]
  • Scheduled publishing publishes the latest draft at that time. If you fix the draft after scheduling, click [下書き保存] and the fixed values are published
  • If you have unsaved changes, “編集中の内容が保存されていません” (Your edits are not saved) is shown. Unsaved values are not included in scheduled publishing
  • When you click [予約を保存], the current values are checked against the publishing rules. You cannot schedule if, for example, a [必須](Required) field is empty
  • Scheduled unpublishing stops publishing. The draft remains

To cancel a schedule, click [予約公開を取り消す](Cancel scheduled publish) or [予約公開終了を取り消す](Cancel scheduled unpublish). You can also cancel by clearing the date and time field and clicking [予約を保存].

If you click [公開](Publish) by hand before the scheduled time, the scheduled publish is removed. If you unpublish by hand, the scheduled unpublish is removed.

If the draft no longer meets the publishing rules by the scheduled time, it is not published. For example, this happens when you save with a [必須](Required) field empty. In this case, a [予約失敗](Schedule failed) mark appears in the list, and [予約](Schedule) on the edit screen shows “予約公開に失敗しました” (Scheduled publishing failed) with the date, time, and reason.

Fix the values and click [下書き保存](Save draft), then schedule again or click [公開](Publish).

You can also be notified of failed scheduled publishing by webhook (the [予約公開の失敗](Scheduled publishing failed) event in Set up webhooks).

  1. Click […](more actions) in the upper right of the edit screen.
  2. Click [公開終了](Unpublish).

“公開を終了しました” (Unpublished) is shown, and the state becomes [公開終了](Unpublished). You can no longer get the entry with the Content API. The draft remains, so you can publish again by clicking [公開](Publish).

Compare with a previous revision, go back to a previous revision

Section titled “Compare with a previous revision, go back to a previous revision”

Each time you click [下書き保存](Save draft) or [公開](Publish), the values at that time are kept as a revision.

To compare with a previous revision, do the following.

  1. Under [情報](Info) on the right of the edit screen, click [履歴](History).
  2. In the revision list, use the [比較元](Compare from) and [比較先](Compare to) columns to choose the 2 revisions you want to compare.

Below the list, the fields that changed between the 2 revisions are shown, with the changed parts marked. At first, the newest revision is compared with the one before it.

To go back to the values of a previous revision, do the following.

  1. On the history screen, click [#<リビジョン番号> を編集画面に読み込む](Load # into the edit screen) for the revision you want to go back to.
  2. The values of that revision are filled into the edit screen. Check the values.
  3. Click [下書き保存](Save draft) or [公開](Publish).

When you save, the loaded values are kept as a new revision. Previous revisions are not deleted or overwritten. To stop before saving, click [読み込みを取り消す](Cancel loading).

You can filter entries with the fields at the top of the entry list.

  • Enter words in [タイトル・本文を検索](Search title and body) to search both published revisions and drafts
  • Use [ステータス](Status) to narrow to one of [公開中](Published), [下書きあり](Has draft), [公開終了](Unpublished), or [予約あり](Scheduled)
  • Click the [更新日時](Updated), [公開日時](Published), or [作成日時](Created) header to sort in that order

A deleted entry, including its revision history, cannot be restored.

  1. Click […](more actions) in the upper right of the edit screen.
  2. Click [削除](Delete).
  3. On the confirmation screen, click [削除] again.

“エントリーを削除しました” (Entry deleted) is shown, and you return to the list. An entry used by another entry’s [参照](Reference) or [複数参照](Multiple references) field cannot be deleted. First remove it from the entries that reference it.

Check that you can get the published entry with the Content API. Replace <hostname> with your environment’s hostname, <endpoint> with the content type’s [エンドポイント](Endpoint), <entry ID> with the entry’s ID, and <API key> with an API key that has the [読み取り](Read) permission.

ターミナルウィンドウ
curl https://<hostname>.hakocms.net/api/v1/content/<endpoint>/<entry ID> \
-H "Authorization: Bearer <API key>"

When the content type is a single, leave off /<entry ID> at the end of the URL.

If the entry’s values are returned as JSON, it is published. If 404 is returned, check that the state is [公開中](Published) or [公開中(下書きあり)](Published (with draft)).