From b9d6210fdb0e3fd5f536fac20963ee704386a6a6 Mon Sep 17 00:00:00 2001 From: Avijit Gupta <526avijit@gmail.com> Date: Fri, 13 Aug 2021 21:45:50 +0200 Subject: [PATCH] Minor fixes (#52) * Add beach image jpg and webp * Fix images and avatar css * Increase border width, add links to feather icons in basic doc * Add robots txt file * Remove paginate * Update documentation --- README.md | 7 ++-- exampleSite/config.toml | 1 + .../posts/theme-documentation-advanced.md | 40 ++++++++++++++++++- .../posts/theme-documentation-basics.md | 15 ++++++- themes/gokarna/static/css/main.css | 2 +- 5 files changed, 59 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7f4f0b5..8897346 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,19 @@ Gokarna is an opinionated theme with a focus on minimalism and simplicity. 1. [Yash Mehrotra](https://yashmehrotra.com) 2. [Avijit Gupta](https://twitter.com/526avijit) -#### Demo: [https://gokarna-hugo.netlify.app](https://gokarna-hugo.netlify.app) +### Demo: [https://gokarna-hugo.netlify.app](https://gokarna-hugo.netlify.app) ## Features - Minimalistic & fast - Customizable header - Responsive -- Support for light and dark themes -- Native fonts +- Available in light and dark themes +- Native fonts and support for [feather icons](https://feathericons.com/) - Syntax highlighting - SEO Ready - Option to add custom javascript and css +- RSS Feed ## Screenshots diff --git a/exampleSite/config.toml b/exampleSite/config.toml index fc12b4a..5bcf11f 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,6 +4,7 @@ theme = "gokarna" languageCode = "en" defaultContentLanguage = "en" enableEmoji = true +enableRobotsTXT = true # Choose one of emacs, trac or perldoc pygmentsStyle = "monokai" diff --git a/exampleSite/content/posts/theme-documentation-advanced.md b/exampleSite/content/posts/theme-documentation-advanced.md index 6f6a7ce..a42e036 100644 --- a/exampleSite/content/posts/theme-documentation-advanced.md +++ b/exampleSite/content/posts/theme-documentation-advanced.md @@ -5,7 +5,6 @@ date: 2020-05-06T21:29:01+08:00 description: "Discover how to maximise Gokarna's potential" tags: ["installation", "configuration", "markdown"] type: post - --- Gokarna is an opinionated theme with a focus on minimalism and simplicity. @@ -23,6 +22,7 @@ This is the default blog post type which will be shown in your "Posts" section a title: "Hello, world!" date: 2021-01-01 description: "A blog post" +image: "path/to/image.png" type: "post" tags: ["blog"] --- @@ -38,6 +38,7 @@ We introduced this type to distinguish between blog posts and normal markdown pa ```markdown --- title: "Hello, world!" +image: "path/to/image.png" type: "page" --- @@ -109,3 +110,40 @@ pygmentsStyle = "monokai" ``` You can read more about syntax highlighting on the [official hugo docs](https://gohugo.io/content-management/syntax-highlighting/). + +## Site Metadata + +Gokarna enables you to improve the SEO performance of your website with minimal effort. + +### Image preview + +We make sure your pages are social media ready. + +![Social Media Preview](/images/theme-documentation-advanced/preview.png "Social Media Preview") + +```markdown +--- +title: "Hello, world!" +image: "path/to/image.png" +--- +``` + +> Note: If no image is specified in the markdown metadata, the site avatar is automatically used instead. + +### SEO keywords + +The keywords relevant for SEO are composed of the page `tags` as defined below: + +```markdown +--- +title: "Hello, world!" +tags: ["hello", "world"] +--- +``` + +and the `metaKeywords` specified in the config.toml: + +```markdown +[params] + metaKeywords = ["blog", "gokarna", "hugo"] +``` diff --git a/exampleSite/content/posts/theme-documentation-basics.md b/exampleSite/content/posts/theme-documentation-basics.md index e0b402e..5736c4d 100644 --- a/exampleSite/content/posts/theme-documentation-basics.md +++ b/exampleSite/content/posts/theme-documentation-basics.md @@ -54,6 +54,9 @@ title = "My New Hugo Site" theme = "gokarna" +# Automatically generate robots.txt +enableRobotsTXT = true + [menu] [[menu.main]] # Unique identifer for a menu item @@ -84,7 +87,7 @@ theme = "gokarna" url = "https://github.com" weight = 3 - # We use feather-icons + # We use feather-icons: https://feathericons.com/ pre = "" ``` @@ -148,6 +151,9 @@ In addition to [Hugo global configuration](https://gohugo.io/overview/configurat # Ideal usecase for this is to import custom js/css or add your analytics snippet customHeadHTML = "" + # Keywords relevant for SEO + metaKeywords = ["blog", "gokarna", "hugo"] + # If you want to display posts on the homepage, the options are # "popular" (order posts by weight), "recent" (order posts by date) # or "" (do not display, default option) @@ -225,6 +231,13 @@ You can add custom HTML in head section Read more in the advanced section [here](/posts/theme-documentation-advanced/#custom-head-html) +### robots.txt + +Automatically generate robots.txt + +```toml +enableRobotsTXT = true +``` ### Favicons, Browserconfig, Manifest diff --git a/themes/gokarna/static/css/main.css b/themes/gokarna/static/css/main.css index 244c579..0315ca1 100644 --- a/themes/gokarna/static/css/main.css +++ b/themes/gokarna/static/css/main.css @@ -205,7 +205,7 @@ a:hover .feather-sun { padding: 0; } .post-tags .post-tag { - border: 1px solid; + border: 1.5px solid; border-radius: 4px; box-sizing: border-box; color: inherit;