| 
									
										
										
										
											2024-06-13 09:41:31 +01:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-03 16:48:38 +01:00
										 |  |  | require "rake" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | task default: :build | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | desc "Build the site." | 
					
						
							|  |  |  | task :build do | 
					
						
							|  |  |  |   sh "jekyll", "build" | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-02 13:52:27 -05:00
										 |  |  | desc "Run Markdownlint to validate the Markdown style." | 
					
						
							| 
									
										
										
										
											2022-11-19 17:06:01 -05:00
										 |  |  | task :lint do | 
					
						
							|  |  |  |   sh "mdl $(git ls-files '*.md' | grep -v 'Manpage.md')" | 
					
						
							| 
									
										
										
										
											2021-12-02 13:52:27 -05:00
										 |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | desc "Run HTMLProofer to validate the HTML output." | 
					
						
							| 
									
										
										
										
											2018-10-03 16:48:38 +01:00
										 |  |  | task test: :build do | 
					
						
							|  |  |  |   require "html-proofer" | 
					
						
							|  |  |  |   HTMLProofer.check_directory( | 
					
						
							|  |  |  |     "./_site", | 
					
						
							| 
									
										
										
										
											2024-06-11 13:53:16 +01:00
										 |  |  |     parallel:            { in_threads: 4 }, | 
					
						
							|  |  |  |     favicon:             true, | 
					
						
							| 
									
										
										
										
											2023-08-31 16:02:18 +01:00
										 |  |  |     ignore_status_codes: [0, 403], | 
					
						
							| 
									
										
										
										
											2024-06-11 13:53:16 +01:00
										 |  |  |     check_favicon:       true, | 
					
						
							|  |  |  |     check_opengraph:     true, | 
					
						
							|  |  |  |     check_html:          true, | 
					
						
							|  |  |  |     check_img_http:      true, | 
					
						
							|  |  |  |     enforce_https:       true, | 
					
						
							|  |  |  |     ignore_files:        [ | 
					
						
							|  |  |  |       /Kickstarter-Supporters/, | 
					
						
							| 
									
										
										
										
											2018-10-03 16:48:38 +01:00
										 |  |  |     ], | 
					
						
							| 
									
										
										
										
											2024-06-11 13:53:16 +01:00
										 |  |  |     ignore_urls:         [ | 
					
						
							|  |  |  |       "/", | 
					
						
							| 
									
										
										
										
											2023-09-01 00:46:10 +01:00
										 |  |  |       %r{https://formulae.brew.sh"}, | 
					
						
							| 
									
										
										
										
											2023-09-13 09:00:37 +01:00
										 |  |  |       %r{https://github.com/}, | 
					
						
							| 
									
										
										
										
											2024-06-11 13:53:16 +01:00
										 |  |  |       "https://legacy.python.org/dev/peps/pep-0453/#recommendations-for-downstream-distributors", | 
					
						
							| 
									
										
										
										
											2023-09-01 00:46:10 +01:00
										 |  |  |     ], | 
					
						
							| 
									
										
										
										
											2024-06-11 13:53:16 +01:00
										 |  |  |     cache:               { | 
					
						
							| 
									
										
										
										
											2023-09-01 00:46:10 +01:00
										 |  |  |       timeframe: { | 
					
						
							| 
									
										
										
										
											2024-06-11 13:53:16 +01:00
										 |  |  |         external: "1h", | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2018-10-03 16:48:38 +01:00
										 |  |  |   ).run | 
					
						
							|  |  |  | end |