contentgate
v0.2.0Pre-deploy checks for content sites: keywords, translations, links, claims, page SEO/GEO audit.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
check_keywords
Verify that target keywords actually appear in a rendered page. Every term tied at the highest search volume must appear at least `primary_min_hits` times; every other term at least once. Matching is literal and case-insensitive: whitespace is never normalised, because 'web hosting' and 'webhosting' are different terms with different search volumes.
| Parameter | Type | Description |
|---|---|---|
html * | string | Rendered HTML of the page. |
keywords * | object | Map of keyword to monthly search volume, taken from real tool data. |
exclude_classes | array | Classes whose subtree is ignored. Use this for site-wide call-to-action blocks, otherwise they satisfy the check on every page. |
primary_min_hits | integer | |
scope | array | Element to look inside, as [tag, class], e.g. ["article","post"]. Omit to read the whole document. |
check_translation
Compare a translation against its source document for structural drift: heading sequence, HTML tag sequence, table row count, internal link paths, price tokens, locale prefix on internal links, leftover source-script characters, introduced em dashes and emoji. This checks structure, not meaning: it cannot tell you a translation is good, only that it is no longer the same document.
| Parameter | Type | Description |
|---|---|---|
locale * | string | Locale code of the translation, e.g. "es". Internal links are expected to carry it as a prefix. |
source * | string | The source-language markdown. |
translation * | string | The translated markdown. |
check_locale_prefix | boolean | |
forbid_source_script | boolean | Set false when the target legitimately shares the source script, e.g. Simplified Chinese from a Traditional Chinese source. |
require_front_matter | boolean | Require line 1 to be an H1 and line 2 to be a summary blockquote. |
check_internal_links
Check that a content page links to at least one commercial page of its own site from its body, and optionally that it states a concrete figure. Links inside excluded boilerplate do not count, because a site-wide call-to-action block would otherwise satisfy this on every page and the check would guard nothing. Relative links count; an absolute link counts only when its host is in site_hosts (or a subdomain of one), so a link to another site's /pricing/ page never does. The money path is matched against the link's path, not its query string.
| Parameter | Type | Description |
|---|---|---|
html * | string | |
money_paths * | array | Path prefixes that count as commercial, e.g. ["/pricing/","/services/"]. |
exclude_classes | array | Classes whose subtree is ignored. Use this for site-wide call-to-action blocks, otherwise they satisfy the check on every page. |
extra_evidence | array | Literal strings that satisfy require_figure on their own, such as named product modules. |
require_figure | boolean | Also require a concrete price or quantity in the body. "Contact us for a quote" is not an offer. |
scope | array | Element to look inside, as [tag, class], e.g. ["article","post"]. Omit to read the whole document. |
site_hosts | array | Hosts that are this site, e.g. ["www.example.org"]; subdomains included. Without it, absolute http(s) links never count as internal. |
check_claims
Scan copy for affirmative performance claims of the kind that get finance, health and other regulated advertising rejected: guaranteed profit, stated win rates, promised returns. A disclaimer is not flagged when its negation governs the claim itself, shortly before it in the same clause (不保證獲利, 'we do not guarantee profit', 'no guaranteed returns'), or when the phrase is named as forbidden ('guaranteed profit claims are banned'). A negation elsewhere in the sentence does not count: 保證獲利,絕不會虧損 is still a claim.
| Parameter | Type | Description |
|---|---|---|
text * | string | Plain text or HTML. HTML tags are ignored. |
sitemap_lastmod
Decide a sitemap lastmod date honestly. Hash the meaningful content of a page, compare it against the stored hash, and move the date only when the content genuinely changed. Stamping today's date on every URL every build teaches crawlers that the field carries no information.
| Parameter | Type | Description |
|---|---|---|
body * | string | Current HTML of the page. |
today * | string | Today's date, ISO format. |
previous_hash | string | null | Stored hash from the last run, or null for a page seen for the first time. |
previous_lastmod | string | null | Stored lastmod, ISO date. |
strip_classes | array | Classes to remove before hashing: visitor counters, build ids, anything that changes on its own. |
strip_patterns | array | Regular expressions to remove before hashing. |
content_hash
Hash the meaningful content of a page, with volatile blocks and scripts removed. Use it to tell a real edit from a rebuild.
| Parameter | Type | Description |
|---|---|---|
body * | string | |
strip_classes | array | |
strip_patterns | array |
audit_page
Page-level SEO/GEO audit of one rendered HTML page, before it ships. Checks: visible_text (characters readable with JavaScript off, excluding <template> and elements with the hidden attribute; Google renders JavaScript, but many AI crawlers read only the HTML the server sent, so an article injected by a script is invisible to them); structured_data (every JSON-LD block parses, required @type values are present, dateModified exists; a required type is satisfied by its schema.org subtypes, e.g. BlogPosting or NewsArticle for Article; a ProfilePage is not required to be an Article); outbound_link…
| Parameter | Type | Description |
|---|---|---|
html * | string | Rendered HTML of the page, as the server sends it. |
url * | string | The page's public URL. Decides which links are external and whether this is the home page. |
checks | array | Run only these checks. Default: all six. |
cite_ok | array | outbound_links: domains you cite editorially, matched with their subdomains, e.g. ["gov.uk"]. Ordinary editorial links need no rel, so this is the right fix for a reported citation, not adding nofollo… |
min_chars | integer | visible_text: minimum characters readable with JavaScript off. 1200 is a house rule, not a search-engine number. |
require_date_modified | boolean | structured_data: require a dateModified. |
require_types | array | structured_data: @type values that must be present. |
stock_phrases | array | stock_phrases: phrases to flag, matched case-insensitively. Default: one editor's Traditional Chinese list, whose connectives (因此,, 然而,) also flag ordinary sentences; replace it with your… |
compare_pages
Measure how many sentences two pages share word for word, using the text a crawler sees with JavaScript off (navigation and footers excluded). Sentences split on 。!? and on . ! ? followed by whitespace; sentences under ten characters are ignored. The share is measured in characters, in both directions, and the larger figure decides, because a short page copied into a long one is a small share of the long page and all of the short one.
| Parameter | Type | Description |
|---|---|---|
html_a * | string | Rendered HTML of the first page. |
html_b * | string | Rendered HTML of the second page. |
max_share | number | Largest acceptable shared share, 0 to 1. |