fix: migrate ".Site.Author" to ".Site.Params.Author" (#17)
* feat: migrate ".Site.Author" to ".Site.Params.Author" * feat: update README
This commit is contained in:
		
							parent
							
								
									d47670bc5d
								
							
						
					
					
						commit
						558b8b4ae0
					
				
					 7 changed files with 26 additions and 26 deletions
				
			
		|  | @ -3,7 +3,7 @@ | |||
|   // @summary: jquery implementation | ||||
|   $(function() { | ||||
|     // @summary: Use the author's flickr ID to load images from the public flickr feed | ||||
|     $.getJSON("https://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Author.flickrid }}&format=json&jsoncallback=?", function(data) { | ||||
|     $.getJSON("https://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Params.Author.flickrid }}&format=json&jsoncallback=?", function(data) { | ||||
|       iweblog.application.displayImages(data, 8); | ||||
|     }); | ||||
|   }); | ||||
|  |  | |||
|  | @ -1,14 +1,14 @@ | |||
| <footer> | ||||
|   <div class="footer_text"> | ||||
|       <div> | ||||
|         <h3>Hi, <a href="{{ .Site.Author.aboutpage }}">I'm {{ .Site.Author.firstname }}</a></h3> | ||||
|         <h3>Hi, <a href="{{ .Site.Params.Author.aboutpage }}">I'm {{ .Site.Params.Author.firstname }}</a></h3> | ||||
|         <p> | ||||
|           {{ partial "bio.html" . }} | ||||
|         </p> | ||||
|       </div> | ||||
|       {{ if isset .Site.Author "flickrid" | and ( not ( eq .Site.Author.flickrid "" ) ) }} | ||||
|       {{ if isset .Site.Params.Author "flickrid" | and ( not ( eq .Site.Params.Author.flickrid "" ) ) }} | ||||
|       <div> | ||||
|           <h3><a href="https://www.flickr.com/photos/{{ .Site.Author.flickrid }}/">Photo Stream</a></h3> | ||||
|           <h3><a href="https://www.flickr.com/photos/{{ .Site.Params.Author.flickrid }}/">Photo Stream</a></h3> | ||||
|           <div id="photos"></div> | ||||
|         </div> | ||||
|       </div> | ||||
|  | @ -17,8 +17,8 @@ | |||
| 
 | ||||
|   {{ if .Site.Params.showcopyright }} | ||||
|     <div class="footer_copyright"> | ||||
|       © {{ now.Format "2006" }} <a href="{{ .Site.Author.aboutpage }}">{{ .Site.Author.firstname }} {{ .Site.Author.lastname }}</a> | ||||
|       {{ with .Site.Author.location }} - Made in {{ . }}{{ end }} | ||||
|       © {{ now.Format "2006" }} <a href="{{ .Site.Params.Author.aboutpage }}">{{ .Site.Params.Author.firstname }} {{ .Site.Params.Author.lastname }}</a> | ||||
|       {{ with .Site.Params.Author.location }} - Made in {{ . }}{{ end }} | ||||
|     </div> | ||||
|   {{ end }} | ||||
| </footer> | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| <header> | ||||
|   <nav> | ||||
|     <h1><a href="/">@{{ .Site.Author.handle }}</a>’s {{ .Site.Title }}.</h1> | ||||
|     <h1><a href="/">@{{ .Site.Params.Author.handle }}</a>’s {{ .Site.Title }}.</h1> | ||||
|     <div class="menu"> | ||||
| 		{{ if isset .Site.Params "rsssections" }} | ||||
| 			{{ $.Scratch.Add "sections" .Site.Params.rsssections }} | ||||
|  | @ -13,7 +13,7 @@ | |||
| 					{{ end }} | ||||
| 				</li> | ||||
| 				{{ end }} | ||||
| 				{{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }} | ||||
| 				{{ with .Site.Params.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }} | ||||
| 			</ul> | ||||
| 		{{ else }} | ||||
| 			<ul> | ||||
|  | @ -22,7 +22,7 @@ | |||
| 					<a href="{{.URL}}">{{ .Name }}</a> | ||||
| 				</li> | ||||
| 				{{ end }} | ||||
| 				{{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }} | ||||
| 				{{ with .Site.Params.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }} | ||||
| 			</ul> | ||||
|       	{{ end }} | ||||
|     </div> | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ | |||
|     <meta charset="utf-8"> | ||||
|     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|     <meta name="author" content="{{ with .Site.Author.firstname }}{{ . }}{{ end }} {{ with .Site.Author.lastname }}{{ . }}{{ end }}"> | ||||
|     <meta name="author" content="{{ with .Site.Params.Author.firstname }}{{ . }}{{ end }} {{ with .Site.Params.Author.lastname }}{{ . }}{{ end }}"> | ||||
|     <meta name="description" content="{{ with .Site.Params.description }}{{ . }}{{ end }}"> | ||||
| 
 | ||||
|     {{ $siteTitle := .Site.Title }} {{ $title := $siteTitle }}{{ if .IsPage }}{{ $title = .Title }} | ||||
|  | @ -13,12 +13,12 @@ | |||
|     {{ if .Param "feature" }}<meta property="og:image" content="{{ .Site.BaseURL }}{{ .Params.feature }}">{{ end }} | ||||
|     <meta property="og:url" content="{{ .Page.Permalink }}"> | ||||
|     <meta property="og:description" content="{{ .Summary }}"> | ||||
|     <meta property="og:site_name" content="@{{ .Site.Author.handle }}’s {{ .Site.Title }}"> | ||||
|     <meta property="og:site_name" content="@{{ .Site.Params.Author.handle }}’s {{ .Site.Title }}"> | ||||
|     <meta name="twitter:card" content="summary_large_image"> | ||||
|     {{ end }} | ||||
|     {{ hugo.Generator }} | ||||
|     {{ $.Scratch.Add "title" .Site.Title }} | ||||
|     <title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} · {{ end }}{{ end }}@{{ .Site.Author.handle }}’s {{ .Site.Title }}</title> | ||||
|     <title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} · {{ end }}{{ end }}@{{ .Site.Params.Author.handle }}’s {{ .Site.Title }}</title> | ||||
| 
 | ||||
|     <link rel="stylesheet" href="{{.Site.BaseURL}}css/joshin-color-palette.css" media="screen" charset="utf-8" /> | ||||
|     <link rel="stylesheet" href="{{.Site.BaseURL}}css/joshin-color-light.css" media="screen" charset="utf-8" /> | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||||
|   <channel> | ||||
|     <title>@{{ .Site.Author.handle }}’s {{ .Site.Title }}{{ with .Title }} - {{ . }}{{ end }}</title> | ||||
|     <title>@{{ .Site.Params.Author.handle }}’s {{ .Site.Title }}{{ with .Title }} - {{ . }}{{ end }}</title> | ||||
|     <link>{{ .Site.BaseURL }}{{ .Permalink }}</link> | ||||
|     <description>All entries {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description> | ||||
|     <generator>Hugo -- gohugo.io</generator> | ||||
|  | @ -14,7 +14,7 @@ | |||
|         <title>{{ .Title }}</title> | ||||
|         <link>{{ .Permalink }}</link> | ||||
|         <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> | ||||
|         <author>{{ with .Site.Author.email }}{{.}} - {{end}}{{ with .Site.Author.firstname }}{{.}}{{ end }} {{ with .Site.Author.lastname }}{{.}}{{end}}</author> | ||||
|         <author>{{ with .Site.Params.Author.email }}{{.}} - {{end}}{{ with .Site.Params.Author.firstname }}{{.}}{{ end }} {{ with .Site.Params.Author.lastname }}{{.}}{{end}}</author> | ||||
|         <guid>{{ .Permalink }}</guid> | ||||
|         <description>{{ .Content | html }}</description> | ||||
|       </item> | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||||
|   <channel> | ||||
|     <title>@{{ .Site.Author.handle }}’s {{ .Site.Title }}{{ with .Title }} - {{ . }}{{ end }}</title> | ||||
|     <title>@{{ .Site.Params.Author.handle }}’s {{ .Site.Title }}{{ with .Title }} - {{ . }}{{ end }}</title> | ||||
|     <link>{{ .Permalink }}</link> | ||||
|     <description>All entries {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description> | ||||
|     <generator>Hugo -- gohugo.io</generator> | ||||
|  | @ -17,7 +17,7 @@ | |||
|         {{ end }} | ||||
|         <link>{{ .Permalink }}</link> | ||||
|         <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> | ||||
|         <author>{{ with .Site.Author.email }}{{.}} - {{end}}{{ with .Site.Author.firstname }}{{.}}{{ end }} {{ with .Site.Author.lastname }}{{.}}{{end}}</author> | ||||
|         <author>{{ with .Site.Params.Author.email }}{{.}} - {{end}}{{ with .Site.Params.Author.firstname }}{{.}}{{ end }} {{ with .Site.Params.Author.lastname }}{{.}}{{end}}</author> | ||||
|         <guid>{{ .Permalink }}</guid> | ||||
|         <description>{{ .Content | html }}</description> | ||||
|       </item> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue