make: update home page from wiki sidebar properly
This commit is contained in:
		
							parent
							
								
									371ac23843
								
							
						
					
					
						commit
						6fa5c4d570
					
				
							
								
								
									
										13
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Makefile
									
									
									
									
									
								
							| @ -970,17 +970,18 @@ site-build: site/hakyll-std/hakyll-std site/manual.md \ | |||||||
| 	$(call def-help,site-build, generate the hledger.org website with hakyll-std ) | 	$(call def-help,site-build, generate the hledger.org website with hakyll-std ) | ||||||
| 	-cd site; hakyll-std/hakyll-std build | 	-cd site; hakyll-std/hakyll-std build | ||||||
| 
 | 
 | ||||||
| site/docs.md: wiki/_Sidebar.md \ | site/index.md: wiki/_Sidebar.md \ | ||||||
| 	$(call def-help,site/docs.md, update docs page with wiki sidebar content which should be in ./wiki/_Sidebar ) | 	$(call def-help,site/index.md, update home page with wiki sidebar content which should be in ./wiki/_Sidebar ) | ||||||
| 	(sed -ne '1,/<!-- WIKICONTENT -->/ p'     site/docs.md     ; \
 | 	(sed -ne '1,/<!-- WIKICONTENT -->/ p'     site/index.md     ; \
 | ||||||
| 	 sed -ne '/^#.*User/,$$ p'                 wiki/_Sidebar.md \
 | 	 sed -ne '/^#.*User/,$$ p'                 wiki/_Sidebar.md \
 | ||||||
| 	 | perl -p \
 | 	 | perl -p \
 | ||||||
| 			-e 's/\[\[([^\|]*)\|([^\]]*)\]\]/[\1](https:\/\/github.com\/simonmichael\/hledger\/wiki\/\2)/g;' \
 | 			-e 's/\[\[([^\|]*)\|([^\]]*)\]\]/[\1](https:\/\/github.com\/simonmichael\/hledger\/wiki\/\2)/g;' \
 | ||||||
| 		  -e 's/\[\[([^\]]*)\]\]/[\1](https:\/\/github.com\/simonmichael\/hledger\/wiki\/\1)/g;' \
 | 		  -e 's/\[\[([^\]]*)\]\]/[\1](https:\/\/github.com\/simonmichael\/hledger\/wiki\/\1)/g;' \
 | ||||||
|  | 		  -e 's/^# >/##/;' \
 | ||||||
| 	 ; \
 | 	 ; \
 | ||||||
| 	 sed -ne '/<!-- ENDWIKICONTENT -->/,$$ p' site/docs.md     ) \
 | 	 sed -ne '/<!-- ENDWIKICONTENT -->/,$$ p' site/index.md     ) \
 | ||||||
| 	> site/_docs.md.$$$$ && \
 | 	> site/_index.md.$$$$ && \
 | ||||||
| 	mv site/_docs.md.$$$$ site/docs.md | 	mv site/_index.md.$$$$ site/index.md | ||||||
| 
 | 
 | ||||||
| site-clean: site/hakyll-std/hakyll-std \ | site-clean: site/hakyll-std/hakyll-std \ | ||||||
| 	$(call def-help,site-clean, remove hakyll-generated files (& take down the website) ) #cleanolddocs | 	$(call def-help,site-clean, remove hakyll-generated files (& take down the website) ) #cleanolddocs | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user