mirror of
				https://github.com/jakejarvis/jarv.is.git
				synced 2025-10-31 03:56:03 -04:00 
			
		
		
		
	enable comments via utteranc.es
This commit is contained in:
		| @@ -50,6 +50,16 @@ main#single { | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   div#comments { | ||||
|     margin-top: 1.5em; | ||||
|     padding-top: 0.5em; | ||||
|     border-top: 2px solid $color-light; | ||||
|  | ||||
|     div.utterances { | ||||
|       max-width: unset; | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -32,6 +32,7 @@ disableAliases = true | ||||
|   license = "CC-BY-4.0" | ||||
|   licenseFull = "Creative Commons Attribution 4.0 International" | ||||
|   licenseURL = "https://creativecommons.org/licenses/by/4.0/" | ||||
|   utterancesRepo = "jakejarvis/jarv.is" | ||||
|  | ||||
| [author] | ||||
|   name = "Jake Jarvis" | ||||
|   | ||||
| @@ -17,6 +17,12 @@ | ||||
|     <div id="content"> | ||||
|       {{ .Content }} | ||||
|     </div> | ||||
|  | ||||
|     {{ if eq hugo.Environment "production" }} | ||||
|     <div id="comments"> | ||||
|       {{ partial "scripts/utterances" . }} | ||||
|     </div> | ||||
|     {{ end }} | ||||
|   </article> | ||||
| </main> | ||||
| {{ end }} | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
| {{ partial "functions/social-images" . -}} | ||||
| {{ partial "head/open-graph" . -}} | ||||
| {{ partialCached "head/mobile" . -}} | ||||
| {{ partialCached "head/preload" . -}} | ||||
| {{ partial "head/preload" . -}} | ||||
| {{ partialCached "head/styles" . -}} | ||||
| {{ partialCached "head/favicons" (dict "pngSizes" "192 48 32 16" "icoSizes" "16 32 48") -}} | ||||
| <link rel="manifest" href="{{ "site.webmanifest" | absURL }}"> | ||||
|   | ||||
| @@ -1,4 +1,10 @@ | ||||
| {{ if eq hugo.Environment "production" }}<link rel="preconnect" href="https://s.jarv.is">{{ end }} | ||||
| {{ if eq hugo.Environment "production" }} | ||||
| <link rel="preconnect" href="https://s.jarv.is"> | ||||
| {{ if and .IsPage (eq .Type "notes") }} | ||||
| <link rel="preconnect" href="https://utteranc.es"> | ||||
| {{ end }} | ||||
| {{ end }} | ||||
|  | ||||
| <link rel="preload" href="{{ "fonts/inter-regular-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> | ||||
| <link rel="preload" href="{{ "fonts/inter-medium-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> | ||||
| <link rel="preload" href="{{ "fonts/inter-bold-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> | ||||
|   | ||||
							
								
								
									
										8
									
								
								layouts/partials/scripts/utterances.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								layouts/partials/scripts/utterances.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <script src="https://utteranc.es/client.js" | ||||
|         repo="{{ .Site.Params.utterancesRepo }}" | ||||
|         issue-term="og:title" | ||||
|         label="comments" | ||||
|         theme="github-light" | ||||
|         crossorigin="anonymous" | ||||
|         async defer> | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user