diff --git a/.personalize.toml b/.personalize.toml deleted file mode 100644 index 63c6607..0000000 --- a/.personalize.toml +++ /dev/null @@ -1,30 +0,0 @@ -Name = "" - -# Supports markdown -About = "" - -Email = "" - -# Add the filename with file extension. -Resume = "" - -# Sets the number of posts to display on the front page -PostLimit = 4 - -GoatCounterCode = "" - -[[profiles]] -name = "GitHub" -url = "" - -[[profiles]] -name = "Twitter" -url = "" - -[[profiles]] -name = "Goodreads" -url = "" - -[[profiles]] -name = "LinkedIn" -url = "" diff --git a/README.md b/README.md index 6067d10..5bf6f84 100644 --- a/README.md +++ b/README.md @@ -29,46 +29,42 @@ For more information read the [official setup guide](https://gohugo.io/overview/ To personalize the theme -`cp themes/lekh/.personalize.toml data/personalize.toml` +`cp themes/lekh/exampleSite/config.toml config.toml` And then customize accordingly. -Or simply copy the below into a new file called `data/personalize.toml` and customize accordingly. +Or simply copy the below config and customize accordingly. ```toml +baseURL = "http://rtiwari.me/" +languageCode = "en-us" +title = "Rahul Tiwari" +theme = "lekh" + +[params] Name = "" - -# Supports markdown -About = "" - Email = "" +Resume = "" # Add the filename with file extension. +PostLimit = 4 # Sets the number of posts to display on the front page +GoatCounterCode = "" -# Add the filename with file extension. -Resume = "" - -# Sets the number of posts to display on the front page -PostLimit = 4 - -[[profiles]] +[[params.profiles]] name = "GitHub" url = "" -[[profiles]] +[[params.profiles]] name = "Twitter" url = "" -[[profiles]] +[[params.profiles]] name = "Goodreads" url = "" -[[profiles]] +[[params.profiles]] name = "LinkedIn" url = "" -# This is the endpoint under the integrations section of the Site Code -GoatCounterCode = "" - ``` ## Posts diff --git a/exampleSite/config.toml b/exampleSite/config.toml new file mode 100644 index 0000000..aad1fb2 --- /dev/null +++ b/exampleSite/config.toml @@ -0,0 +1,27 @@ +baseURL = "http://rtiwari.me/" +languageCode = "en-us" +title = "Rahul Tiwari" +theme = "lekh" + +[params] +Name = "" +Email = "" +Resume = "" # Add the filename with file extension. +PostLimit = 4 # Sets the number of posts to display on the front page +GoatCounterCode = "" + +[[params.profiles]] +name = "GitHub" +url = "" + +[[params.profiles]] +name = "Twitter" +url = "" + +[[params.profiles]] +name = "Goodreads" +url = "" + +[[params.profiles]] +name = "LinkedIn" +url = "" \ No newline at end of file diff --git a/exampleSite/data/personalize.toml b/exampleSite/data/personalize.toml deleted file mode 100644 index 87ecb53..0000000 --- a/exampleSite/data/personalize.toml +++ /dev/null @@ -1,30 +0,0 @@ -Name = "Agent Smith" - -# Supports markdown -About = "We're not here because we're free. We're here because we're __not__ free. There's no escaping reason. No denying purpose. Because as we both know without purpose, we would not exist.
Read more [here](https://matrix.fandom.com/wiki/Agent_Smith)" - -Email = "agent.smith@thematrix.com" - -# Add the filename with file extension. -Resume = "" - -# Sets the number of posts to display on the front page -PostLimit = 4 - -GoatCounterCode = "" - -[[profiles]] -name = "GitHub" -url = "https://github.com/invinciblycool" - -[[profiles]] -name = "Twitter" -url = "https://twitter.com/getFANDOM" - -[[profiles]] -name = "Goodreads" -url = "https://www.goodreads.com/user/show/91520565-rahul-tiwari" - -[[profiles]] -name = "LinkedIn" -url = "https://www.linkedin.com/in/rahul-tiwari-43708b128/" diff --git a/layouts/index.html b/layouts/index.html index 8bf8ffe..ece3ae5 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,24 +4,24 @@ -

{{ .Site.Data.personalize.Name }}

+

{{ .Site.Params.Name }}

-

{{ .Site.Data.personalize.About| markdownify }}

+
{{ .Content }}
- {{ range .Site.Data.personalize.profiles }} + {{ range .Site.Params.profiles }} {{ partial "profile_link.html" . }} {{ end }} - {{ if ne .Site.Data.personalize.Resume "" }} + {{ if ne .Site.Params.Resume "" }} - + {{ end }} - {{ if ne .Site.Data.personalize.Email "" }} + {{ if ne .Site.Params.Email "" }} - + {{ end }}
 Resume Resume
 {{ .Site.Data.personalize.Email }} {{ .Site.Params.Email }}
@@ -31,21 +31,19 @@
- {{ with .Site.Data.personalize.PostLimit }} - {{ range first .Site.Data.personalize.PostLimit .Pages.ByPublishDate }} + {{ range first (.Site.Params.PostLimit | default 4) (where .Site.RegularPages.ByPublishDate "Section" "posts") }}
{{ .Title }}

{{ end }} - {{ end }}

View all posts

- {{ if ne .Site.Data.personalize.GoatCounterCode "" }} - + {{ if ne .Site.Params.GoatCounterCode "" }} + {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 7cc35fb..c85c218 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -6,10 +6,10 @@ - {{ .Site.Data.personalize.Name }} + {{ .Site.Params.Name }} - \ No newline at end of file + diff --git a/layouts/partials/page_header.html b/layouts/partials/page_header.html index 87200a4..19ff6f4 100644 --- a/layouts/partials/page_header.html +++ b/layouts/partials/page_header.html @@ -5,9 +5,9 @@ - \ No newline at end of file +