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

github.com/balaramadurai/hugo-travelify-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBala Ramadurai <bala@balaramadurai.net>2020-12-29 07:55:38 +0300
committerBala Ramadurai <bala@balaramadurai.net>2020-12-29 07:55:38 +0300
commit4effe5d6ad4db17f5a4e28fa823a83b7ed1a0a30 (patch)
tree6034acb6206c22639597786dd375dd1094a812a6
parent47cd48e4622b4fdaeee5ea7f3454fe807f9460bf (diff)
PR #33 merged
-rw-r--r--exampleSite/config.toml25
-rw-r--r--layouts/partials/nav.html52
2 files changed, 38 insertions, 39 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 8ac4cdb..8adfc05 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -76,24 +76,23 @@ canonifyURLs = true
[params.privacy]
enable = true # false implies switching on tracking application, you can individually turn off applications that you don't want. If enable = true, then all tracking apps are switched off
facebook_like = true
-DisqusShortname = "nikimonikado"
+DisqusShortname = "example"
[social]
# Add your social network accounts to the profile section on the left
# by entering your username. The links to your account will be
# created automatically.
rss = "Needed" # leave this to blank if you do not want RSS feed icon to appear on top
- github = "nikimonikado"
- flickr = "nikimonikado"
- instagram = "nikimonikado"
- youtube = "nikimonikado"
- vimeo = "nikimonikado"
- tumblr = "nikimonikado"
- linkedin = "nikimonikado"
- pinterest = "nikimonikado"
- googleplus = "nikimonikado"
- facebook = "nikimonikado"
- twitter = "nikimonikado"
+ github = "example"
+ flickr = "example"
+ instagram = "example"
+ youtube = "example"
+ vimeo = "example"
+ tumblr = "example"
+ linkedin = "example"
+ pinterest = "example"
+ facebook = "example"
+ twitter = "example"
email = "joe@example.com"
# Enable and disable widgets for the right sidebar
@@ -114,7 +113,7 @@ DisqusShortname = "nikimonikado"
num_features = 6 # The slider picks up the banner images from the N most recent posts, where num_features is N.
[permalinks]
- categories = "/categories/:slug/"
+ categories = "/categories/:slug/" #can be changed to "/category/:slug/"
tags = "/tags/:slug/"
[taxonomies]
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index e3c033b..41b4857 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,32 +1,32 @@
<nav id="main-nav" class="clearfix">
<div class="container clearfix">
<ul class="root">
- {{ $currentPage := . }}
- {{ range .Site.Menus.main.ByWeight }}
- <li class="menu-item menu-item-type-post_type menu-item-object-page {{if $currentPage.HasMenuCurrent "main" . }} active{{end}}">
- <a href="{{ .URL }}">{{ .Name }}</a>
- {{ if .HasChildren }}
- <ul class="sub-menu">
- {{ range .Children }}
- <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children">
- <a href="{{ .URL }}">{{ .Name }}
- </a>
- {{ if .HasChildren }}
- <ul class="sub-menu">
- {{ range .Children }}
- <li class="menu-item menu-item-type-taxonomy menu-item-object-category">
- <a href="{{ .URL }}">{{ .Name }}
- </a>
- </li>
- {{ end }}
- </ul>
- {{ end }}
- </li>
- {{ end }}
- </ul>
- {{ end }}
- </li>
- {{ end }}
+ {{ $rel := $.Page.RelPermalink }}
+ {{ range .Site.Menus.main.ByWeight }}
+ <li class="menu-item menu-item-type-post_type menu-item-object-page {{ if eq $rel .URL }}active{{end}}">
+ <a href="{{ .URL }}">{{ .Name }}{{ if .HasChildren }} &raquo;{{ end }}</a>
+ {{ if .HasChildren }}
+ <ul class="sub-menu">
+ {{ range .Children }}
+ <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children">
+ <a href="{{ .URL }}">{{ .Name }}{{ if .HasChildren }} &raquo;{{ end }}
+ </a>
+ {{ if .HasChildren }}
+ <ul class="sub-menu">
+ {{ range .Children }}
+ <li class="menu-item menu-item-type-taxonomy menu-item-object-category">
+ <a href="{{ .URL }}">{{ .Name }}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+ {{ end }}
+ </li>
+ {{ end }}
+ </ul>
+ {{ end }}
+ </li>
+ {{ end }}
</ul>
</div><!-- .container -->
</nav><!-- #main-nav -->