Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/invinciblycool/lekh.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuyash Belekar <suyash192@gmail.com>2021-05-02 11:17:50 +0300
committerGitHub <noreply@github.com>2021-05-02 11:17:50 +0300
commit1b445a0c2613ea2ea25b213c48a9218c614bd5d2 (patch)
tree7c5c89823fa40c143297a2a28ff5ed814bc388af
parentdc836bde5226f184ee77974fe5db8c4703211de5 (diff)
Remove data/personalize.toml and shift all params to config.toml (#9)
* Remove data/personalize.toml and shift all params to config.toml. Change "About" section in index page to be fetched from content/_index.md. * Fix twitter profile param key in config.toml. * Fix twitter profile param key in README.md.
-rw-r--r--.personalize.toml30
-rw-r--r--README.md34
-rw-r--r--exampleSite/config.toml27
-rw-r--r--exampleSite/data/personalize.toml30
-rw-r--r--layouts/index.html22
-rw-r--r--layouts/partials/head.html4
-rw-r--r--layouts/partials/page_header.html4
7 files changed, 56 insertions, 95 deletions
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
-Name = ""
-
-# Supports markdown
-About = ""
+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 = ""
-# 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.<br/> 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 @@
<body>
- <h1>{{ .Site.Data.personalize.Name }}</h1>
+ <h1>{{ .Site.Params.Name }}</h1>
- <h4>{{ .Site.Data.personalize.About| markdownify }}</h4>
+ <div>{{ .Content }}</div>
<table>
- {{ range .Site.Data.personalize.profiles }}
+ {{ range .Site.Params.profiles }}
{{ partial "profile_link.html" . }}
{{ end }}
<tr>
- {{ if ne .Site.Data.personalize.Resume "" }}
+ {{ if ne .Site.Params.Resume "" }}
<td><i class="fas fa-file-alt" aria-hidden="true"></i></td>
- <td>&nbsp;<a href="/resume/{{ .Site.Data.personalize.Resume }}" target="_blank">Resume</a></td>
+ <td>&nbsp;<a href="/resume/{{ .Site.Params.Resume }}" target="_blank">Resume</a></td>
{{ end }}
</tr>
<tr>
- {{ if ne .Site.Data.personalize.Email "" }}
+ {{ if ne .Site.Params.Email "" }}
<td><i class="fas fa-envelope" aria-hidden="true"></i></td>
- <td>&nbsp;<code>{{ .Site.Data.personalize.Email }}</code></td>
+ <td>&nbsp;<code>{{ .Site.Params.Email }}</code></td>
{{ end }}
</tr>
</table>
@@ -31,21 +31,19 @@
<div>
<!-- orders content according to the "publishdate" field in front matter -->
- {{ 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") }}
<div>
<a href="{{ .Permalink }}">{{ .Title }}</a><br />
<time>{{ .Date.Format "January 2, 2006" }}</time>
</div>
<br />
{{ end }}
- {{ end }}
<h3><a href="posts/">View all posts</a></h3>
</div>
- {{ if ne .Site.Data.personalize.GoatCounterCode "" }}
- <script data-goatcounter="{{ .Site.Data.personalize.GoatCounterCode }}" async src="//gc.zgo.at/count.js"></script>
+ {{ if ne .Site.Params.GoatCounterCode "" }}
+ <script data-goatcounter="{{ .Site.Params.GoatCounterCode }}" async src="//gc.zgo.at/count.js"></script>
{{ end }}
</body>
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 @@
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/fonts.css">
<!-- End stylesheets -->
- <title>{{ .Site.Data.personalize.Name }}</title>
+ <title>{{ .Site.Params.Name }}</title>
<link rel="icon" type="image/png" href="/assets/img/favicon.ico" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<script src="/js/dark.js" defer=""></script>
-</head> \ No newline at end of file
+</head>
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 @@
<header class="site-header">
<div class="wrapper">
- <a class="muted small" href="{{ .Site.BaseURL }}">{{ .Site.Data.personalize.Name }}</a>
+ <a class="muted small" href="{{ .Site.BaseURL }}">{{ .Site.Params.Name }}</a>
</div>
</header>
</body>
-</html> \ No newline at end of file
+</html>