fix(wpcarro/blog): Fix broken post links
TL;DR: - copy rendered posts to $out/posts - update postUrl attr - remove unused attrs Change-Id: I027c20d6244e4626128788ad9aa1f1aad7855f32 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4723 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									e107311cb8
								
							
						
					
					
						commit
						c05c6920ee
					
				
					 2 changed files with 7 additions and 10 deletions
				
			
		|  | @ -34,15 +34,12 @@ let | |||
| 
 | ||||
|   toPostHtml = post: readFile (pkgs.substituteAll { | ||||
|     src = ./fragments/post.html; | ||||
|     postUrl = "${config.baseUrl}/${post.key}.html"; | ||||
|     postUrl = "${config.baseUrl}/posts/${post.key}.html"; | ||||
|     postTitle = post.title; | ||||
|     postDate = formatDate post.date; | ||||
|   }); | ||||
| in { | ||||
|   inherit posts rendered config; | ||||
| 
 | ||||
|   root = pkgs.runCommandNoCC "wpcarros-blog" {} '' | ||||
|     mkdir -p $out | ||||
|     cp ${wpcarro.website.render postsHtml} $out/index.html | ||||
|   ''; | ||||
| } | ||||
| in pkgs.runCommandNoCC "wpcarros-blog" {} '' | ||||
|   mkdir -p $out | ||||
|   cp ${wpcarro.website.render postsHtml} $out/index.html | ||||
|   cp -r ${rendered} $out/posts | ||||
| '' | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue