mirror of
				https://github.com/Brandon-Rozek/website-theme.git
				synced 2025-10-29 17:31:12 +00:00 
			
		
		
		
	Updated hugo way
This commit is contained in:
		
							parent
							
								
									cc623bd90a
								
							
						
					
					
						commit
						fd4db04d3a
					
				
					 1 changed files with 4 additions and 5 deletions
				
			
		|  | @ -35,13 +35,12 @@ | |||
| </style> | ||||
| 
 | ||||
| {{ $apiUrl := printf "https://api.brandonrozek.com/highfive%s" .RelPermalink }} | ||||
| {{ $resource := resources.GetRemote $apiUrl }} | ||||
| {{ $initialCount := 0 }} | ||||
| {{ if $resource }} | ||||
|   {{ with $resource.Err }} | ||||
|     {{ warnf "Failed to fetch highfive data from %s: %s" $apiUrl . }} | ||||
|     {{ $initialCount = 0 }} | ||||
| {{ with try (resources.GetRemote $apiUrl) }} | ||||
|   {{ with .Err }} | ||||
|     {{ warnf "Failed to fetch highfive data from %s" $apiUrl }} | ||||
|   {{ else }} | ||||
|     {{ $resource := .Value }} | ||||
|     {{ $highfiveData := $resource | transform.Unmarshal }} | ||||
|     {{ if $highfiveData.count }} | ||||
|       {{ $initialCount = $highfiveData.count }} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue