0. Get My Website
Clone the Website From Github
git clone --recurse-submodules https://github.com/NYH-Dolphin/nyh-dolphin.github.io.git
This will both clone the website repo, and the gonkarna submodule.
Bind BaseURL
Under the root folder, open cmd.
hugo server --bind=127.0.0.1 --baseURL=https://NYH-Dolphin.github.io
1. Modify Gokarna
Multilanguage
Copy the files from i18n/
to themes/gokarna/i18n/
Copy the files from layout
to themes/gokarna/layout/
Under the themes/gokarna/layouts/partials/header.html
, which includes modification of how to switch the languages
<span class="nav-language-divider"></span>
{{ with .Translations }}
{{ range . }}
{{ if eq .Language.Lang $.Language.Lang }}
<a class="active" aria-current="page" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
{{ end }}
{{ end }}
{{ end }}
Add Social Icon
Paste the standard .svg
icon from static/icons/
to the themes/gokarna/static/svg/icons
Then under then config.toml
, you can use the new social icon
Standard Page Layout
Footer
Footer defines my website footer part themes/gokarna/layouts/partials/footer.html
I simply decorate the footer, and add the site counter.
Check the revise of bottom corner of the page. Once updating Gokarna submodule from Github, pay attention to update content the footer.html
.
<span>.............................................................................................................</span>
<!-- import counter code -->
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span>© {{ now.Year }} {{ .Site.Params.Footer}} | Total Visitors: <a id="busuanzi_value_site_pv">...</a></span>
<span>Made with ❤️ using <a target="_blank" href="https://github.com/526avijitgupta/gokarna">Gokarna</a></span>
Music
Register one of the music player plugin.
If there is new update, it is required to change the music list in the website of music player plugin.
Add two lines of scripts to themes/gokarna/layouts/partials/footer.html
Check the revise of bottom corner of the page. Once updating Gokarna submodule from Github, pay attention to update content the footer.html
.
<script src="https://player.lzti.com/player/js/jquery.min.js" type="text/javascript"></script>
<script src="https://player.lzti.com/api/player/167601724233" id="myhk" key="167601724233" m="1"></script>
One of the problem is that this music player plugin has high delays overseas. Making it unsuitable for oversea usage. Opps…
2. What is Gokarna?
Introduction
My website is based on a beautiful and simple website framework: Gokarna. Developers are Yash Mehrotra and Avijit Gupta.
Gokarna focuses on ultimate minimalism and simplicity. 😊
Basic Guide
- Gokarna Website Template: https://gokarna-hugo.netlify.app/
- Theme Documentation - Basics
- Theme Documentation - Advanced
Contribution
I really love the design style of this website. Thus I will continue reporting issues and providing suggestions. Gokarna’s developers are keen on revising, and they accept pull requests (Though is not that fast, they keep doing it 💕).