Add GitHub "edit" button (#157)
This commit is contained in:
		
							parent
							
								
									aaf31f419e
								
							
						
					
					
						commit
						25a4d3b6e1
					
				
					 3 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -15,7 +15,8 @@
 | 
			
		|||
  <article>
 | 
			
		||||
      {{if .Title}}<h1>{{ .Title }}</h1>{{end}}
 | 
			
		||||
      <p class="meta">
 | 
			
		||||
          Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}
 | 
			
		||||
          Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}. 
 | 
			
		||||
          {{ partial "github.html" . }}
 | 
			
		||||
      </p>
 | 
			
		||||
      <ul class="tags">
 | 
			
		||||
          {{ range (.GetTerms "tags") }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								layouts/partials/github.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								layouts/partials/github.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
{{if $.Site.Data.config.enableGitHubEdit}
 | 
			
		||||
<a href="{{$.Site.Data.config.GHlink}}/{{ .Path}}" rel="noopener">Edit Source</a>
 | 
			
		||||
{{end}}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue