Allow files to be placed inside 'drafts' inside 'source'; will be converted to HTML, but not shown on sitemap
This commit is contained in:
		
							
								
								
									
										12
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								build.sh
									
									
									
									
									
								
							| @@ -13,10 +13,16 @@ | ||||
| # | ||||
| #  To use it, create a directory for your project (e.g. 'website'). Inside 'website', create | ||||
| #  two directories: 'source' (which holds your Markdown files) and 'output' (which holds the | ||||
| #  converted HTML. To exclude files from the conversion process, place them inside a directory | ||||
| #  converted HTML.  | ||||
| # | ||||
| #  To exclude files from the conversion process, place them inside a directory | ||||
| #  named 'exclude' inside 'source'. This directory will not be copied over into 'output', and  | ||||
| #  any files inside it will not be converted. | ||||
| # | ||||
| #  If you want a file to be converted, but not displayed in the sitemap, then place it inside a directory | ||||
| #  called 'drafts' inside 'source'. The converted file will still be accessible via its path, but it will not | ||||
| #  be shown on the sitemap. | ||||
| # | ||||
| #  In addition to these directories, three files are needed in 'website': | ||||
| #  1. 'header.html' - A header, which is prepended to every source file. Unfortunately, this must | ||||
| #		      be written in regular HTML. | ||||
| @@ -215,8 +221,8 @@ md_to_html() { | ||||
| 	rm -rf "$BASE_PATH"/temp/* | ||||
| } | ||||
|  | ||||
| gen_sorted_file_list() { # Generate a list of the HTMl files, sorted by when they were last modified (read from the contents of the HTML file) | ||||
| 	local files=$(find "$BASE_PATH/output" -name "*.html") | ||||
| gen_sorted_file_list() { # Generate a list of the HTMl files, sorted by when they were last modified (read from the contents of the HTML file). Exclude all files in the 'drafts' directory. | ||||
| 	local files=$(find "$BASE_PATH/output" -name "*.html" -not -path "${BASE_PATH}/output/drafts/*") | ||||
| 	local date_mod | ||||
|  | ||||
| 	for file in $files; do | ||||
|   | ||||
		Reference in New Issue
	
	Block a user