fix: Normalizes any bodycopy to "Hackertours" casing
This commit is contained in:
parent
3f9eb7faf7
commit
efab84c6ae
3 changed files with 138 additions and 40 deletions
15
layouts/_partials/lint-brand.html
Normal file
15
layouts/_partials/lint-brand.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{{- with .File -}}
|
||||
{{- $file := . -}}
|
||||
{{- $source := readFile .Filename -}}
|
||||
{{- range $index, $line := split $source "\n" -}}
|
||||
{{- if not (findRE `(?:#\s*hackertours-lint-ignore|<!--\s*hackertours-lint-ignore\s*-->)\s*$` $line) -}}
|
||||
{{- $text := replaceRE `\]\([^)]*\)` "]" $line -}}
|
||||
{{- $text = replaceRE `(?i)(?:https?://|mailto:|www\.)[^\s<>"']+|[[:alnum:]._%+-]+@[[:alnum:]._-]+|@[[:alnum:]_]+|#[[:alnum:]_-]+:[[:alnum:]._-]+` "" $text -}}
|
||||
{{- range findRE `(?i)\bhackertours\b` $text -}}
|
||||
{{- if ne . "Hackertours" -}}
|
||||
{{- errorf "%s:%d: %q should be \"Hackertours\" (different casing) - to ignore this, add a hackertours-lint-ignore comment on this line" $file.Filename (add $index 1) . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
{{ partial "lint-brand.html" . }}
|
||||
<!DOCTYPE html>
|
||||
<html class="nojs" lang="{{ site.Language.Locale | default site.Language.Name }}" dir="{{ site.Language.Direction | default "ltr" }}"{{ with $.Param "colorScheme" }} data-theme="{{ . }}"{{ end }}>
|
||||
<head>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{{ partial "lint-brand.html" . }}
|
||||
<!DOCTYPE html>
|
||||
<html class="nojs" lang="{{ site.Language.Locale | default site.Language.Name }}" dir="{{ site.Language.Direction | default "ltr" }}"{{ with $.Param "colorScheme" }} data-theme="{{ . }}"{{ end }}>
|
||||
<head>
|
||||
|
|
|
|||
Loading…
Reference in a new issue