mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
QA: Check HTML Correctness & Fix Existing Errors
- _contrib/bco-htmlproof: check HTML for correctness; fail on any errors - _contrib/bco-htmlproof: accept path for individual page to help debug page problems - (Many files) Convert `&` in numerous elements to `&` - _templates/download.html: use Liquid filter to automatically escape `&` in magnet links. Also premptively tell HTML not to check the magnet link when checking external links (this check is not currently enabled) - _releases/*: Escape `<parameter>` used in multiple Bitcoin Core release notes - _templates/choose-you-wallet.html: change mSigna URL from .../coinvault&referer=bitcoin.org to .../coinvault?referer=bitcoin.org - _templates/community.html: fix duplicate anchors by renaming one anchor - _templates/events.html: move Javascript to separate file because it contains forbidden HTML close tags within the `<script></script>` tags. - (Many files, mostly in _translations/) Fix many broken open tags or missing close tags. - _translatios/zh_TW.yml & ko.yml: fix a total of three invalid characters (control characters)
This commit is contained in:
parent
28d7ef0f1d
commit
ec343d54d1
39 changed files with 96 additions and 87 deletions
|
@ -2,12 +2,18 @@
|
|||
|
||||
require 'html/proofer'
|
||||
|
||||
if ARGV[0].nil?
|
||||
path_to_check="./_site"
|
||||
else
|
||||
path_to_check=ARGV[0]
|
||||
end
|
||||
|
||||
## Will throw an exception (exiting false) if any internal links don't
|
||||
## work. The Makefile will terminate on the failure
|
||||
HTML::Proofer.new(
|
||||
## To test, uncomment the array below and comment out ./_site and :disable_external
|
||||
#[ "/foo/bar#baz", "/foo/bar", "#", "#wallet", "/foo.css", "/bar.png", "/zh_TW/bitcoin-for-businesses" ],
|
||||
"./_site",
|
||||
path_to_check,
|
||||
|
||||
{
|
||||
## Disable external link checking by default to avoid spurious
|
||||
|
@ -16,6 +22,9 @@ HTML::Proofer.new(
|
|||
## manual checks
|
||||
:disable_external => true,
|
||||
|
||||
## Check whether HTML is well-formed
|
||||
:check_html => true,
|
||||
|
||||
## Links to ignore
|
||||
:href_ignore => [
|
||||
'#', ## hrefs pointing to the current page (htmlproofer fails them)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue