This document discusses processes, procedures, and practices for the update of this CLDR site, https://cldr.unicode.org

General Information

Hosting

The site, https://cldr.unicode.org is automatically deployed from changes to the main branch of the docs/site directory of the CLDR repo. Hosting and build services are provided by CloudFlare, on a worker named cldr-next.

Proposing Changes

Changes to the site are effected by means of GitHub pull requests. When a PR is created that updates docs/site, a special label is automatically added, Site Update

If the branch is on the “head fork” (the CLDR upstream repository), then a preview link is generated for each commit.

This is the recommended practice, so that the site can be previewed exactly as it will be deployed. Create a branch with your GitHub username, such as srl295/CLDR-1234 This is different from how we normally create CLDR feature branches in a personal fork. PRs that are NOT on the head fork will be harder to review because we can’t preview them. Review such changes carefully, since merging to main updates the site.

The preview links are comments on the pull request, titled for example Deploying with Cloudflare Workers. There will be a commit preview URL, an a branch preview URL. The commit preview URL such as https://16221760-cldr-next.unicode.workers.dev/ shows what a specific commit looks like, whereas the branch preview URL such as https://srl295-site-how-to-update-cldr-18019-site-cldr-next.unicode.workers.dev/ is a link that remains valid even if that PR gets an additional update.

Hint: If you want to share a link to review the PR, you will usually share the branch preview URL so that the latest version of the PR can be reviewed.

When visiting a preview URL, click on the link in the right sidebar to visit the Sitemap (example link). In a preview deployment, there’s a special yellow box that appears at the top of the Sitemap indicating which site pages have changed in this PR, for example:

Site Pages changed in this Preview:
development/updating-site.md
index/cldr-spec.md
index/cldr-spec/updating-spec.md
Note: this section will not show up in the production build.

Redirects

See the _redirects file for documentation on the redirects process.

Authoring Site Content

We follow Github Flavored Markdown plus some extensions. The Github Guide can provide helpful guidance on the format.

File Naming

All Markdown filenames end in .md, but the .md is removed from the final URL.

For example:

File Name in Repo URL
/docs/site/index.md https://cldr.unicode.org/
/docs/site/development.md https://cldr.unicode.org/development
/docs/site/development/updating-site.md https://cldr.unicode.org/development/updating-site

Note that “development” is on both the name of a .md file, and a directory containing other files.

As a historical artifact, there are a number of pages as of this writing are under the /docs/site/index subdirectory, such as https://cldr.unicode.org/index/charts. There is an effort CLDR-18575 to drop /index/ as a subdirectory, leaving only index.md as the top level homepage and many other paths collapsed by one segment. The directory named /index has no special significance.

All files must be listed in the sitemap or the build will fail.

sitemap

Level 1 Level 2 Level 3 Github directory
  cldr-tc    
    cldr-tc/design-wg site/cldr-tc
    cldr-tc/message-format-wg  
    cldr-tc/person-name-wg  
    cldr-tc/infrastructure-wg  
    index/keyboard-workgroup site/index/
    ddl site/
  general-information    
    index/language-support-levels site/index/language-support-levels

Titles and Frontmatter

Add frontmatter (two lines with triple dashes ---) with a title at the top of the document. The title should be quoted (single or double quotes) if it contains any special characters. It’s always safe to quote.

---
title: "This is: My page title (New!)"
---

## This is the first heading

This is a paragraph

## This is the second heading

This is another paragraph

Note that the headings begin at ## (second level). This is because the first level (h1) heading is an older way to represent the title. If there is also an `h1 heading, it will be ignored in favor of the title. The renderer will automatically repeat the title inside the document.

---
title: "This is my title"
---

# ~This line is extraneous, remove it~

## First heading…

Links to other pages within the site must be host-relative links.

Example: to link to the heading Adding New Locales under the source file /docs/site/requesting_changes.md

Use this link: [Adding New Locales](/requesting_changes#adding-new-locales)

Note that it is a host-relative link, beginning with /.

Don’t use absolute links to the site or subpages of https://cldr.unicode.org (nor http://cldr.unicode.org) from within the site.

Also, don’t link to .md or .html files within the site, instead just link to the ‘base name’ of the file (without the .md or .html suffix).

NOTE: CLDR-18011 will fix the link format to be relative links to the .md files.

A header such as ## Who uses CLDR? automatically acts as an anchor to #who-uses-cldr — there is no reason to add an explicit anchor.

Don’t change any header text without an additional change. If you really must rename a header, you can add an additional custom anchor to the old name so that our links are never broken (our policy). Use the following format whenever you do this, with the custom anchor on the line before the heading.

Example:

OLD:

### Old Heading

NEW:

<a name="old-heading"></a>
### New Heading

Techniques and Procedures

Testing Locally

See https://github.com/unicode-org/cldr/blob/main/tools/scripts/web/docker/README.md for instructions on locally testing the site.

Making changes using the GitHub.com web interface

You can complete the entire editing process using a browser logged in to github.com. Here are the steps:

(1) Open a ticket and locate your source file

In this example, hypothetical CLDR ticket “CLDR-98765” asks for a modification to the page: https://cldr.unicode.org/index/cldr-spec/core-data-for-new-locales

This corresponds to the markdown file: https://github.com/unicode-org/cldr/blob/main/docs/site/index/cldr-spec/core-data-for-new-locales.md

(2) Select the file to change

(3) Make the required edits to the file

Using the GitHub editor, you can switch between the “Edit” (raw markdown text) and “Preview” (a display of how the text will be rendered). This will be close to the final format, but not exactly the same.

(4) Commit the changes

(5) Create the pull request

(6) Adding additional commits

If further changes are needed (perhaps in response to review feedback or because more than one file needs to be changed), you can add additional commits to this branch. These additional commits will become part of this pull request.

Note: If you accept review feedback suggestions in the pull request, make sure that you accept them with a properly formatted commit message, as simple as: CLDR-17995 accept review comments

(7) Never change page names

(8) Adding a new page or directory

(9) Modifying the site/sitemap.tsv

See sitemap for instructions.