Validate documentation for broken links and images

This commit is contained in:
Paul Pacheco 2018-12-22 10:19:46 -06:00
parent 9f295e2ebf
commit ab80b6f943
5 changed files with 39 additions and 12 deletions

View File

@ -1,5 +1,18 @@
version: '{branch}-{build}'
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- set PATH=C:\Ruby25-x64\bin;%PATH%
- cd docs
- bundle install --quiet
- cd ..
- cp c:\Tools\curl\bin\libcurl.dll C:\Ruby25-x64\bin
before_build:
- nuget restore Mirror/Networking.sln
@ -13,6 +26,10 @@ skip_tags: true
build_script:
- msbuild Mirror/Networking.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration="Debug-Editor" /ConsoleLoggerParameters:Verbosity=quiet
- msbuild Mirror/Networking.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration="Debug" /ConsoleLoggerParameters:Verbosity=quiet
- cd docs
- bundle exec jekyll build
- ruby checksite.rb
- cd ..
artifacts:
- path: Mirror/Output
@ -31,10 +48,9 @@ after_test:
skip_commits:
files:
- '**/*.md'
- '/*.md'
- '**/*.txt'
- '.gitignore'
- 'docs/'
deploy:
description: 'This is a bleeding edge release. BACKUP BEFORE USING THIS AUTOMATED BUILD\n$(APPVEYOR_REPO_COMMIT_MESSAGE)'

View File

@ -1,10 +0,0 @@
---
layout: default
---
<div class="container text-center">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>

2
docs/404.md Normal file
View File

@ -0,0 +1,2 @@
# Page not found :(
The requested page could not be found.

View File

@ -14,3 +14,7 @@ source "https://rubygems.org"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
gem "jekyll-feed"
gem "jekyll-sitemap"
gem "html-proofer"

15
docs/checksite.rb Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env ruby
require 'html-proofer'
options = {
:assume_extension => true, # (true) for extensionless paths
:http_status_ignore => [ 999 ], # LinkedIn throttling errors
:typhoeus => {
# avoid strange SSL errors: https://github.com/gjtorikian/html-proofer/issues/376
:ssl_verifypeer => false,
:ssl_verifyhost => 0
}
}
HTMLProofer.check_directory("./_site", options).run