MCPcopy Create free account
hub / github.com/apache/camel-website / setup

Method setup

rules.js:10–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8 }
9
10 setup() {
11 this.on("dom:ready", event => {
12 const title = event.document.querySelector('html head title');
13 if (title === null) {
14 this.report(event.document.querySelector('html'), "Missing <title> tag in the <head>");
15 }
16 else if (!title.textContent || title.textContent.trim().length === 0) {
17 this.report(title, "No title specified");
18 }
19 else if (title.textContent[0] === '-') {
20 this.report(title, "Title starts with the dash `-`, add the `title` front matter to the Hugo content");
21 }
22 else if (title.textContent.startsWith('Untitled')) {
23 this.report(title, "Title starts with the `Untitled` make sure that the Asciidoc file starts with level 1 heading");
24 }
25 });
26 }
27}
28
29class RelativeLinks extends Rule {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected