mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-04 04:06:36 +00:00 
			
		
		
		
	Add comment
This commit is contained in:
		
							parent
							
								
									319c9b0da3
								
							
						
					
					
						commit
						c1b1f017a9
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -14,6 +14,7 @@
 | 
				
			||||||
    {{ if .TableOfContents }}
 | 
					    {{ if .TableOfContents }}
 | 
				
			||||||
      <!-- Get the amount of headers using regex -->
 | 
					      <!-- Get the amount of headers using regex -->
 | 
				
			||||||
      {{ $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content }}
 | 
					      {{ $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content }}
 | 
				
			||||||
 | 
					      <!-- We only need to show a table of contents if we have over 4 headers -->
 | 
				
			||||||
      {{ if ge (len $headers) 4 }}
 | 
					      {{ if ge (len $headers) 4 }}
 | 
				
			||||||
        <div class="float-lg-end ml-lg-3 mb-3 p-3">
 | 
					        <div class="float-lg-end ml-lg-3 mb-3 p-3">
 | 
				
			||||||
          {{ .TableOfContents }}
 | 
					          {{ .TableOfContents }}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue