Merge pull request #25 from 526avijitgupta/custom-html

Add support for Custom HTML
This commit is contained in:
Avijit Gupta
2021-07-07 13:52:13 +02:00
committed by GitHub
4 changed files with 13 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ A minimal opinionated theme for Hugo
- Syntax highlighting
- Math typesetting
- SEO Ready
- Support for adding custom HTML, which can be used to add snippets or script tags
## Inspiration
@@ -33,8 +34,9 @@ git submodule add https://github.com/526avijitgupta/gokarna.git themes/gokarna
- Navbar
- Footer
- Inject html
- Inject html (Give example)
- Syntax highlighting (Choose one of emacs, trac, perldoc)
- Avatar sizes
## LICENSE

View File

@@ -13,6 +13,7 @@ pygmentsStyle = "emacs"
footer = "The Marauders"
description = "You miss 100% of the shots you don't take"
avatarURL = "https://upload.wikimedia.org/wikipedia/commons/7/7a/1859-Martinique.web.jpg"
customHTML = ""
[menu]
[[menu.main]]

View File

@@ -1,15 +1,24 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Ubuntu|Quicksand-Medium" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" type="text/css" href="/css/main.css">
<link disabled id="dark-theme" rel="stylesheet" href="/css/dark.css">
<script src="https://unpkg.com/feather-icons"></script>
<script src="/js/main.js"></script>
<!-- Option for user to inject custom html -->
{{ if .Site.Params.CustomHTML }}
{{ .Site.Params.CustomHTML | safeHTML }}
{{ end }}
{{ $title := print .Site.Title " | " .Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
<title>{{ $title }}</title>

File diff suppressed because one or more lines are too long