Skip to content

docs: add format and validation pages, and search titles - #5

Merged
MobileMage merged 3 commits into
mainfrom
docs/postcode-search-pages
Oct 28, 2026
Merged

MobileMage merged 3 commits into
mainfrom
docs/postcode-search-pages

Conversation

@MobileMage

Copy link
Copy Markdown
Contributor

Search engines barely list this site, and no page answered the questions that developers and
shop owners type about Nigeria's new postcode. This change names each page in those words, and
it adds three pages that answer them.

Each hand-written page now has a title and a meta description that state its subject in search
words, such as "Nigerian postcode checker" for the playground. Each description has 150
characters or fewer, and a unit test keeps it so. The sidebar labels, the site name "Gatepost"
and the line "Unofficial. Not made or endorsed by NIPOST." stay where they were.

The home page now sets og:type to website. It also carries inline JSON-LD with one WebSite object
and one SoftwareSourceCode object. The data loads nothing from another site.

The new page "Nigeria's digital postcode format" describes the five segments, the written forms,
the rule that 00 is never a valid LGA or unit, and the old 6-digit postcode. Every rule comes from
spec/grammar.md and spec/data. The page gives a regex for the format check, and it says that only
NIPOST's gateway knows whether a postcode exists. A unit test checks that the regex lists the 37
state codes of spec/data/states.json and agrees with parse on 87 vectors of the spec.

The new page "Validate a Nigerian postcode" checks a postcode in TypeScript, in PHP and in a plain
HTML form. It reuses the examples of the guides, and CI runs each one. The HTML block is the
quickstart of the field README, as the examples test requires.

The build now writes a "State codes" page from spec/data/states.json, beside the other spec pages,
so nobody types the codes by hand. The home page and the format page link the new pages. The
Start group of the sidebar lists the format page and the validation page, and the Spec group
lists the state codes.

The target searches:

  • Nigeria postcode format
  • Nigerian postcode regex
  • validate Nigerian postcode
  • NIPOST postcode API
  • Nigeria postcode checker
  • WooCommerce Nigeria postcode
  • Nigerian state codes

One note for a later change: Packagist lists gatepost/postcode v0.1.0-alpha.1, but the PHP guide
still says that the first alpha is not published. This change leaves that notice as it is,
because src/release-state.json holds one state for all the packages.

pnpm check passes on this branch.

Signed-off-by: MobileMage aidelojejoshua@gmail.com

People search for the two-letter state codes of the new postcode, and
no page listed them. The build now writes a page of the codes from
spec/data/states.json, the file that the SDKs read, so the page cannot
drift from the SDKs (CS-4). The page shows the name and the ISO
3166-2:NG code of each state, and it quotes the source of the codes.

Signed-off-by: MobileMage <aidelojejoshua@gmail.com>
Developers search for the format of the postcode, for a regex and for a
way to validate a postcode, and no page answered those searches. The
format page describes the segments, the forms and the legacy postcode
from grammar.md. Its regex runs in CI, and a test compares it with the
state codes and with the parse vectors of the spec. The validation page
reuses the examples of the guides, and CI runs each one (DOC-3).

Signed-off-by: MobileMage <aidelojejoshua@gmail.com>
A search result shows the title and the description of a page. The old
ones used few of the words that people type, such as "Nigerian postcode
checker". Each hand-written page now names its subject in those words,
with a description of 150 characters or fewer. The sidebar labels stay
as they were. The home page gives its og:type as website, carries
JSON-LD for the site and its source code, and links the new pages.

Signed-off-by: MobileMage <aidelojejoshua@gmail.com>
@MobileMage
MobileMage merged commit d470d0e into main Oct 28, 2026
4 checks passed
@MobileMage
MobileMage deleted the docs/postcode-search-pages branch October 28, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant