mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-31 03:45:24 +01:00 
			
		
		
		
	anchored-headings: port to PaperMod
- add corresponding css - gen anchored headings for h1-h6 - link with single.html
This commit is contained in:
		| @@ -41,7 +41,9 @@ | ||||
|     </details> | ||||
|   </div> | ||||
|   {{- end }} | ||||
|   <div class="post-content">{{ .Content }}</div> | ||||
|   <div class="post-content"> | ||||
|     {{- partial "anchored_headings.html" .Content -}} | ||||
|   </div> | ||||
|   <footer class="post-footer"> | ||||
|     {{- if .Params.tags }} | ||||
|     <ul class="post-tags"> | ||||
|   | ||||
| @@ -1,2 +1,2 @@ | ||||
| <!-- formats .Content headings by adding an anchor --> | ||||
| {{ . | replaceRE "(<h[2-3] id=\"([^\"]+)\".+)(</h[2-9]+>)" "${1}<a class=\"anchor\" href=\"#${2}\">#</a>${3}" | safeHTML }} | ||||
| {{ . | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" "${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\">#</a>${3}" | safeHTML }} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange