Fix disqus comments not loading

This commit is contained in:
Dave Gallant
2021-09-06 23:59:49 -04:00
parent d3dc9d2214
commit 9b6f030f60
41 changed files with 4 additions and 1752 deletions

View File

@@ -25,7 +25,7 @@ menu:
- name: About
url: /about/
weight: 2
- name: Subscribe
- name: RSS
url: /index.xml
params:
@@ -82,25 +82,7 @@ params:
linkedin: dave-gallant
twitter: dave_gallant_
comments:
enable: false
isso:
enable: false
scriptSrc: ''
dataAttrs: ''
staticman:
enable: true
apiEndpoint: 'https://api.staticman.net/v2/entry'
maxDepth: 2
username: MunifTanjim
repository: minimo
utterances:
enable: false
issueTerm: pathname
label: ''
theme: github-light
github:
username: MunifTanjim
repository: minimo
enable: true
search:
client: fuse

View File

@@ -1,5 +1,6 @@
---
title: About
weight: -210
---
I'm a software engineer with a passion for open-source, infrastructure, tooling and security.

View File

@@ -1,145 +0,0 @@
baseURL = "http://www.example.com"
title = "Minimo"
# for smart copyright line, leave this blank and check [params.copyright]
copyright = ""
theme = "minimo"
disqusShortname = ""
googleAnalytics = ""
Paginate = 5
preserveTaxonomyNames = true
enableRobotsTXT = true # generate robots.txt
# Syntax Highlighting ( https://gohugo.io/content-management/syntax-highlighting/ )
pygmentsCodefences = true
enableEmoji = true
# Missing translations will default to this content language
defaultContentLanguage = "en"
[params.info]
description = "Minimalist theme for Hugo"
title404 = "Nothing's here!"
[params.assets]
favicon = "favicon.ico"
customCSS = ["css/custom.css"]
customJS = ["js/custom.js"]
gopher = "" # used in 404 template ( Generator: https://gopherize.me )
[params.copyright]
prefix = ""
holder = "MunifTanjim"
startYear = "2017"
suffix = ""
[params.settings]
# date & time format: https://golang.org/pkg/time/
dateFormat = "2006, Jan 02"
listDateFormat = "2006, Jan 02"
archiveDateFormat = "Jan 02"
hideEntryNavigation = ["page"] # boolean / array of sections
hideEntryMeta = ["page"] # boolean / array of sections
showReadingTime = true
showLastmod = true
taxonomyCloudShuffle = true
accentColor = "#ffcd00"
hideMainMenu = false
[params.sidebar]
enable = true
[params.widgets]
header = ["breadcrumbs"]
homepage = ["recent_posts"]
sidebar = ["about","search","sidebar_menu","taxonomy_cloud"]
footer = ["social_menu"]
[params.opengraph.facebook]
admins = [] # array of Facebook IDs
appID = ""
pageID = ""
[params.opengraph.twitter]
page = "" # Twitter page username
[params.seo]
# Title Separator: - — · • * ⋆ | ~ « » < >
titleSeparator = "•"
[params.social]
codepen = "MunifTanjim"
email = "contact@example.com"
facebook = "MunifTanjim"
github = "MunifTanjim"
gitlab = "MunifTanjim"
instagram = "MunifTanjim"
linkedin = "muniftanjim"
twitter = "MunifTanjim"
telegram = "MunifTanjim"
google_scholar = "qc6CJjYAAAAJ"
youtube = "UCT-U0rNerYxItGcuoPX-WYA"
[params.comments]
enable = false
# Isso: https://posativ.org/isso/
[params.comments.isso]
enable = false
scriptSrc = "" # "https://isso.example.com/js/embed.min.js"
dataAttrs = "" # "data-isso='https://isso.example.com' data-isso-require-author='true'"
[params.comments.staticman]
enable = true
apiEndpoint = "https://api.staticman.net/v2/entry"
maxDepth = 2
username = "MunifTanjim"
repository = "minimo"
# Utterances: https://utteranc.es
[params.comments.utterances]
enable = false
issueTerm = "pathname" # pathname / url / title / og:title / <string>
label = ""
theme = "github-light"
[params.comments.utterances.github]
username = "MunifTanjim"
repository = "minimo"
[params.search]
client = "fuse" # algolia / fuse / lunr
[params.search.algolia]
appId = ""
indexName = ""
searchApiKey = ""
[taxonomies]
author = "authors"
category = "categories"
series = "series"
tag = "tags"
[permalinks]
page = "/:slug/"
[[menu.main]]
name = "Repo"
weight = -10
identifier = "repository"
url = "https://github.com/MunifTanjim/minimo"
[blackfriday]
hrefTargetBlank = true
[languages]
# edit this block for your own language
[languages.en]
lang = "en"
languageName = "English"
weight = 1

View File

@@ -1,9 +0,0 @@
---
title: Home
menu:
- main
- sidebar
weight: -270
---
> Minimalism is not a lack of something. Its simply the perfect amount of something.
> — Nicholas Burroughs

View File

@@ -1,3 +0,0 @@
---
title: Authors
---

View File

@@ -1,10 +0,0 @@
---
title: Documentation
linkTitle: Docs
menu:
main:
sidebar:
identifier: docs
weight: -250
slug: docs
---

View File

@@ -1,48 +0,0 @@
---
date: 2017-09-26T06:00:00+06:00
lastmod: 2017-10-11T17:30:00+06:00
title: Authors Setup Guide
authors: ["muniftanjim"]
categories:
- features
tags:
- authors
slug: authors
---
Minimo supports multiple authors for your site. Just make sure you have the following configuration in your site's **`config.toml`**:
```toml
[taxonomies]
author = "authors"
```
Minimo treats Authors as a [Hugo Taxonomy](https://gohugo.io/content-management/taxonomies/).
## Author's Profile
For adding an author to your site:
- Create **`data/authors`** folder in your site's root directory
- Create a file with the filename format: **`<username>.toml`**
Now, add information about the author using the structure below:
**/data/authors/muniftanjim.toml**
{{< file "data/authors/muniftanjim.toml" >}}
_You can use either the `[email]` fields or the `[social.email]` field. You don't need to fill them both. However, it is encouraged to use `[email]` instead of `[social.email]`._
## Adding Authors to Contents
For adding authors to your content include the following option in your content's front-matter:
```yaml
---
authors: ["muniftanjim"]
---
```
- `authors` [`Array` of `String`s]: username of authors
That's all.

View File

@@ -1,153 +0,0 @@
---
date: 2018-03-29T09:00:00+06:00
lastmod: 2020-08-10T22:00:00+06:00
title: Comments Support
authors: ['muniftanjim']
categories:
- features
tags:
- config
slug: comments-support
comments: true
toc: true
---
Minimo has support for comments baked into it.
## Enable/Disable Comments
### Globally
For enabling or disabling comments globally, check the following setting in your `config.toml` file:
```toml
[params.comments]
enable = false
```
- `params.comments` [`Map`]:
- `enable` [`Boolean`]: Enable/Disable comments globally
### For Specific Posts
The global `.Site.Params.comments.enable` setting can be overridden for specific posts in their content's frontmatter with this option:
```yaml
---
comments: true
---
```
- `comments` [`Boolean`]: Enable/Disable comments for specific posts
_Of course, you'll also need to setup a comment system ( [Disqus](#disqus) or [Staticman](#staticman) )._
## Setting Up Comment System
Minimo currently supports **[Disqus](https://disqus.com/)**, **[Isso](https://posativ.org/isso/)**, **[Staticman](https://staticman.net/)** and **[Utterances](https://utteranc.es)** to be used as your site's comment system.
### Disqus
Disqus comments require you set a single value to the following option in your `config.toml` file:
```toml
disqusShortname = ""
```
- `disqusShortname` [`String`]: Shortname for you site's Disqus account
And that's all!
### Isso
Isso is a lightweight alternative to Disqus. You need to have a Isso server running somewhere, then set up the following options in your `config.toml` file:
```toml
[params.comments.isso]
enable = true
scriptSrc = "https://isso.example.com/js/embed.min.js"
dataAttrs = "data-isso='https://isso.example.com data-isso-require-author='true'"
```
- `params.comments.isso` [`Map`]:
- `enable` [`Boolean`]: Enable Isso
- `scriptSrc` [`String`]: URL of the Isso integration script.
- `dataAttrs` [`String`]: Data attributes to add to the Isso `<script>` tag. Optional, but the Isso documentation recommends to at least include the `data-isso` attribute.
### Staticman
For up-to-date information, check out the [Documentation Site](https://staticman.net) and the [Public Repository](https://github.com/eduardoboucas/staticman) of Staticman.
#### Configure Minimo for Staticman
First of all, set up the following options (with your preferred values) in your `config.toml` file:
```toml
[params.comments.staticman]
enable = true
apiEndpoint = "https://api.staticman.net/v2/entry"
maxDepth = 2
username = "MunifTanjim"
repository = "minimo"
```
- `params.comments.staticman` [`Map`]:
- `enable` [`Boolean`]: Enable Staticman
- `apiEndpoint` [`String`]: API endpoint for Staticman instance
- `maxDepth` [`Integer`]: Maximum allowed comments depth
- `username` [`String`]: Your Git Username
- `repository` [`String`]: Name of your Site's Git Repository
#### Staticman Configuration File
Next, you'll need a Staticman Configuration File (`staticman.yml`) in the root of your site's repository. Here's a sample of it:
**`staticman.yml`**
{{< file "staticman.yml" >}}
##### Notes
- In most cases, you'll only need to change the `name` option (Site's name)
- If you set `moderation: true`, Staticman will send a Pull Request whenever a new comment is submitted. You'll need to Merge the Pull Request to approve it, or Close to discard.
#### Add Staticman to Your Site's Repository
You'll need to go through some additional steps based on the API endpoint (`params.comments.staticman.apiEndpoint`) that you are gonna use. You'll find the relevant information on the following places:
- [Staticman Site](https://staticman.net)
- [Staticman Repository](https://github.com/eduardoboucas/staticman)
_[ Contributors are welcomed to update this part of the documentation to include additional useful information. ]_
### Utterances
_Utterances only supports GitHub. So, if your site's repository is not hosted in GitHub, it won't work._
For using Utterances, set up the following options in your `config.toml` file:
```toml
[params.comments.utterances]
enable = true
issueTerm = "pathname" # pathname / url / title / og:title / <string>
label = ""
theme = "github-light"
[params.comments.utterances.github]
username = "MunifTanjim"
repository = "minimo"
```
- `params.comments.utterances` [`Map`]:
- `enable` [`Boolean`]: Enable Utterances
- `issueTerm` [`String`]: Entry to Issue mapping option _(`pathname` / `url` / `title` / `og:title` / <string>)_
- `label` [`String`]: Label will be assigned to issues created by Utterances
- `theme` [`String`]: Utterances theme that matches your blog
- `params.comments.utterances.github` [`Map`]:
- `username` [`String`]: Your GitHub Username
- `repository` [`String`]: Name of your Site's GitHub Repository
Check _[utteranc.es](https://utteranc.es)_ for more information.
That should do it!

View File

@@ -1,15 +0,0 @@
---
date: 2017-09-25T08:00:00+06:00
lastmod: 2018-02-08T15:15:00+06:00
title: "Configuration File: config.toml"
authors: ["muniftanjim"]
categories:
- others
tags:
- config
slug: config-file
---
This is the Minimo's configuration file ( `config.toml` ) file of this site:
{{< file "config.toml" >}}

View File

@@ -1,40 +0,0 @@
---
date: 2017-09-30T14:00:00+06:00
lastmod: 2018-06-04T23:00:00+06:00
title: Cover Image
authors: ["muniftanjim"]
categories:
- features
slug: cover-image
cover:
image: /images/eden-farm-children-s-village.jpg
caption: Eden Farm Children's Village by [Gareth Harper](https://unsplash.com/photos/yACpBcInUos?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText)
style: full
---
You can add cover image to your contents with the **`cover`** paramameter in the content's front-matter.
You can directly provide the image url:
```yaml
---
cover: /images/eden-farm-children-s-village.jpg
---
```
- `cover` [`String`]: path/url of the cover image
Or you can provide additional information:
```yaml
---
cover:
image: /images/eden-farm-children-s-village.jpg
alternate: Picture of a yellow wall with a blue window in the upper-left corner
caption: Eden Farm Children's Village by Gareth Harper on Unsplash
style: full
---
```
- `cover` [`Map`]:
- `image` [`String`]: path/url of the cover image
- `alternate` [`String`]: alternate text for the image
- `caption` [`String`]: caption for the cover image
- `style` [`String`]: `full` / `wide` / `normal`

View File

@@ -1,37 +0,0 @@
---
date: 2018-02-27T21:00:00+06:00
title: Emoji Support
authors: ["muniftanjim"]
categories:
- features
tags:
- config
emoji: true
---
First of all, if you really want emojis, set the `enableEmoji` setting to `true` in your `config.toml` file:
```toml
enableEmoji = true
```
This will enable Hugo to find Emoji Shorthands in your content files and render them as Unicode Emoji Characters.
For example:
{{% center %}}
<code>:smiley:</code> will become 😃
{{%/ center %}}
No, it'll probably not be that colorful! Unless your device's operating system natively supports colorful emojis, you will see a black & white one instead. :fire:
:pencil2: For getting that colorful look, you will have to add this to your content's frontmatter:
```yaml
---
emoji: true
---
```
And where can you find these Emoji Shorthands :question:
:tada: Go take a look at: **[Emoji Cheat Sheet](http://www.emoji-cheat-sheet.com/)**

View File

@@ -1,71 +0,0 @@
---
date: 2017-09-25T02:00:00+06:00
lastmod: 2018-02-08T15:00:00+06:00
title: Installation Guide
authors: ["muniftanjim"]
categories:
- Tutorial
slug: installation
toc: true
---
First of all you will need to setup a Hugo site. You can follow the [Hugo's Quick Start Guide](https://gohugo.io/getting-started/quick-start/) for that.
After you're done with that, it's time for installing Minimo!
## Installing Minimo
There are two different ways you can install Minimo:
1. As clone
2. As submodule
_The second method is recommended._
#### Install Minimo as clone
With this method, you will simply clone it. And a copy of Minimo's repository will be stored with the rest of you site. Enter the following command for cloning Minimo:
```sh
git clone --depth 1 https://github.com/MunifTanjim/minimo themes/minimo
```
#### Install Minimo as submodule
This method doesn't store a copy of Minimo's repository inside your site's repository. Rather it adds Minimo as a dependency. Start by this command:
```sh
git submodule add https://github.com/MunifTanjim/minimo themes/minimo
```
This will add Minimo's repository as a submodule to your site's repository. Now, you will have to pull the theme:
```sh
git submodule init
git submodule update
```
That's all, Minimo is ready to be used.
## Configuration for Minimo
For getting started with Minimo, copy the **`config.toml`** file from the **`exampleSite`** directory inside Minimo's repository to your site repository:
```sh
cp themes/minimo/exampleSite/config.toml .
```
You can take a look at the [**`config.toml`** file]({{< relref "/docs/config-file.md" >}}) of this site.
Now, you can start editing this file and change the configuration!
### Setting up Authors
Follow the [Authors Setup Guide]({{< relref "/docs/authors.md" >}}) for setting up authors for you site.
### Setting up Widgets
If you want to use Widgets on your site, take a look at the [Widgets documentation]({{< relref "/docs/widgets.md" >}})
-------------
Et voilà! Minimo is ready!

View File

@@ -1,85 +0,0 @@
---
date: 2018-08-12T12:30:00+06:00
lastmod: 2019-07-07T02:00:00+06:00
title: KaTeX Support
authors: ["muniftanjim"]
categories:
- features
tags:
- config
- katex
slug: katex-support
---
## KaTeX Syntax for Markdown
In your Markdown content, use the `katex` shortcode for inserting KaTeX. Check documentation for [Shortcode: katex]({{< relref "/docs/shortcodes.md#shortcode-katex" >}}).
**Here's an example Markdown content:**
```md
When {{</* katex inline */>}} a \ne 0 {{</* /katex */>}}, there are two solutions to
{{</* katex */>}} ax^2 + bx + c = 0 {{</* /katex */>}}
and they are:
{{</* katex */>}}
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
{{</* /katex */>}}
```
**Output:**
When {{< katex inline >}} a \ne 0 {{< /katex >}}, there are two solutions to
{{< katex >}} ax^2 + bx + c = 0 {{< /katex >}}
and they are:
{{< katex >}}
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
{{< /katex >}}
## Customize KaTeX Configuration
You can customize the default behavior of KaTeX if you want.
Minimo picks up configuration for KaTeX from the **`/data/config/katex.json`** file.
The default configuration options look like this:
```json
{
"library": {
"js": {
"main": "//unpkg.com/katex/dist/katex.min.js",
"autoRender": "//unpkg.com/katex/dist/contrib/auto-render.min.js"
},
"css": {
"main": "//unpkg.com/katex/dist/katex.min.css"
}
},
"options": {}
}
```
- `library` [`Object`]:
- `js` [`Object`]:
- `main` [`String`]: URL for the main KaTeX library
- `autoRender` [`String`]: URL for the [auto-render extension](https://khan.github.io/KaTeX/docs/autorender.html)
- `css` [`Object`]:
- `main` [`String`]: URL for the main KaTeX stylesheet
- `options` [`Object`]:
- _[KaTeX configuration options](https://khan.github.io/KaTeX/docs/options.html)_
So, if you want to tinker with it's configuration options:
- Create a `/data/config/katex.json` file in your site's repository
- Copy the default configuration options
- Start hacking
#### Related Guides
- [Configuration Options](https://khan.github.io/KaTeX/docs/options.html)
- [Auto-render Extension](https://khan.github.io/KaTeX/docs/autorender.html)

View File

@@ -1,106 +0,0 @@
---
date: 2018-02-27T18:00:00+06:00
lastmod: 2019-09-28T21:00:00+06:00
title: MathJax Support
authors: ["muniftanjim"]
categories:
- features
tags:
- config
slug: mathjax-support
mathjax: true
---
For enabling MathJax, add this to your content's frontmatter:
```yaml
---
mathjax: true
---
```
## MathJax Syntax for Markdown
In your Markdown content, use `\\(`...`\\)` delimiters for in-line mathematics.
For mathematics blocks you can use either `$$`...`$$` or `\\[`...`\\]` as delimiters.
**Here's an example Markdown content:**
```md
When \\( a \ne 0 \\), there are two solutions to
$$ ax^2 + bx + c = 0 $$
and they are:
\\[ x = {-b \pm \sqrt{b^2-4ac} \over 2a} \\]
```
**Output:**
When \\( a \ne 0 \\), there are two solutions to
$$ ax^2 + bx + c = 0 $$
and they are:
\\[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\\]
## Customize MathJax Configuration
You can customize the default behavior of MathJax if you want.
Minimo picks up configuration for MathJax from the **`/data/config/mathjax.json`** file.
The default configuration options look like this:
```json
{
"library": {
"path": "//unpkg.com/mathjax@2.7.5/MathJax.js",
"config": "TeX-MML-AM_CHTML"
},
"config": {}
}
```
- `library` [`Object`]:
- `path` [`String`]: URL for the main **_MathJax.js_** file.
- `config` [`String`]: _Configuration file_'s name/path
- `config` [`Object`]:
- _In-line configuration options_
So, if you want to tinker with it's configuration options:
- Create a `/data/config/mathjax.json` file in your site's repository
- Copy the default configuration options
- Start hacking
For exmaple, if you want to enable `$`...`$` delimiters for in-line mathematics, you probably want something like this:
```json
{
"library": {
"path": "//unpkg.com/mathjax@2.7.5/MathJax.js",
"config": "TeX-MML-AM_CHTML"
},
"config": {
"tex2jax": {
"inlineMath": [["$", "$"], ["\\(", "\\)"]],
"processEscapes": true
}
}
}
```
### Notice
MathJax version above `2.7.5` is not guaranted to work.
#### Related Guides
- [Using a configuration file](https://docs.mathjax.org/en/latest/configuration.html#using-a-configuration-file)
- [Combined Configurations](https://docs.mathjax.org/en/latest/config-files.html#combined-configurations)
- [Using in-line configuration options](https://docs.mathjax.org/en/latest/configuration.html#using-in-line-configuration-options)
- [Configuration Options](https://docs.mathjax.org/en/latest/options/index.html)

View File

@@ -1,82 +0,0 @@
---
date: 2017-09-27T10:00:00+06:00
lastmod: 2018-05-24T02:10:00+06:00
title: Menus Setup Guide
authors: ["muniftanjim"]
categories:
- features
tags:
- menus
slug: menus
toc: true
menu:
sidebar:
name: Menus
parent: docs
---
Minimo has three menus.
1. Main Menu
2. Sidebar Menu
3. Social Menu
## Main Menu
**name**: `main`
Main menu is located at the top of the site.
Check [Hugo's Menus Documentation](https://gohugo.io/content-management/menus/) for information about managing this menu.
You can hide the Main Menu using the following option in your `config.toml` file:
```toml
[params.settings]
hideMainMenu = true
```
## Sidebar Menu
**name**: `sidebar`
Social Menu is available as Widget: `sidebar_menu`. Add it to the `sidebar` [Widget Area]({{< relref "/docs/widgets.md#available-widget-areas" >}}) to use it.
You can use Sidebar Menu as normal [Hugo Menus](https://gohugo.io/content-management/menus/).
Or you can use it to mirror another menu by using the `sidebar_menu.mirror` option in your [Widgets Configuration File]({{< relref "/docs/widgets.md#widgets-configuration-file" >}}). For example, this will mirror the Main Menu:
```toml
[sidebar_menu]
...
mirror = "main"
```
The sidebar menu can display nested menus. The sub-pages need to have a page as `parent` defined in the page's front matter:
```yaml
menu:
main:
parent: myParentPage
```
## Social Menu
Social Menu is available as Widget: `social_menu`. You can add it to [Widget Areas]({{< relref "/docs/widgets.md#available-widget-areas" >}}) to use it.
Use the variables under `[params.social]` in your `config.toml` file for adding your social profiles:
```toml
[params.social]
codepen = "..."
email = "..."
facebook = "..."
...
```
You only have to add your usernames. Minimo will take care of the rest.
#### Changing Social Menu Icons Order
If you want to change the order of the social menu icons, use the `social_menu.platforms` option in your [Widgets Configuration File]({{< relref "/docs/widgets.md#widgets-configuration-file" >}}).
The social menu icons will appear in the order you specify in the `platforms` array.

View File

@@ -1,62 +0,0 @@
---
date: 2017-09-26T08:00:00+06:00
lastmod: 2017-10-11T18:00:00+06:00
title: Opengraph Support
authors: ["muniftanjim"]
categories:
- features
tags:
- og
slug: opengraph
---
Minimo has built-in support for Opengraph tags. It will pick up most of the things from your contents' front-matters & Hugo configuration.
You can use these options in you content's front-matter:
```yaml
---
audios: [] # for og:audio tags
images: [] # for og:image tags
videos: [] # for og:video tags
---
```
- `audios` [`Array` of `String`s]: path/url of audio files
- `images` [`Array` of `String`s]: path/url of image files
- `videos` [`Array` of `String`s]: path/url of video files
_N.B.: the front-matter syntax shown here is `yaml`. If you use a different format (e.g. `toml`), the syntax will change accordingly._
If you add [**Cover Image**]({{< relref "cover-image.md" >}}) to you content, it will also be picked up.
## Facebook Opengraph
You can set these options in your `config.toml` files for better integration with Facebook:
```toml
[params.opengraph.facebook]
admins = [] # for fb:admins tags
appID = "" # for fb:app_id tag
pageID = "" # for article:publisher tag
```
- `admins` [`Array` of `String`s]: Facebook Profile IDs
- `appID` [`String`]: Facebook Application ID
- `pageid` [`String`]: Facebook Page ID
Also, the `[social.facebook]` field from the [Author's Profile]( /docs/authors/#author-s-profile) data is used for `article:author` tag.
## Twitter Cards
Minimo has built-in support for [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards).
You can set these options in your `config.toml` files to provide additional information for Twitter Cards:
```toml
[params.opengraph.twitter]
page = "" # for twitter:site tag
```
- `page` [`String`]: Twitter Page's Username
Also, the `[social.twitter]` field from the [Author's Profile]( /docs/authors/#author-s-profile) data is used for `twitter:creator` tag.

View File

@@ -1,3 +0,0 @@
---
headless: true
---

View File

@@ -1,94 +0,0 @@
---
date: 2018-07-05T23:30:00+06:00
title: "Search: Algolia"
authors: ["muniftanjim"]
categories:
- features
tags:
- search
- algolia
slug: search-algolia
toc: true
---
## Configure Algolia Search Client
Select Algolia as the search client in your `config.toml` file:
```toml
[params.search]
client = "algolia"
```
Also, add configuration options for Algolia:
```toml
[params.search.algolia]
appId = ""
indexName = ""
searchApiKey = ""
```
- `params.search.algolia` [`Map`]:
- `appId` [`String`]: Algolia Application ID
- `indexName` [`String`]: Name for Algolia Indices
_default: `minimo_site`_
- `searchApiKey` [`String`]: Algolia Search-Only API Key
You'll find various information related to your Algolia account in the [Algolia Dashboard](https://www.algolia.com/dashboard).
## Generate Search Index for Algolia
Algolia will need a search index for searching across your site. So, you'll need to generate that search index for Algolia before you deploy your site.
Minimo comes with a script for generating the search index for Algolia: `/scripts/generate-search-index-algolia.js`.
### Install Dependencies
Node.js must be installed on your system for using the generator script.
It also needs the following npm packages:
- `algoliasearch`
- `glob`
For installing `algoliasearch` and `glob` globally use the following command:
```sh
npm install -g algoliasearch glob
```
### Set Environment Variables
The generator script uses the following environment variables:
- `ALGOLIA_APP_ID` (`required`): Algolia Application ID
- `ALGOLIA_ADMIN_API_KEY` (`required`): Algolia Admin API Key
- `ALGOLIA_INDEX_NAME` (`optional`): Name for Algolia Indices
_default: `minimo_site`_
### Run the Script
After you've generated your site with Hugo, run `generate-search-index-algolia.js` with `node`.
If Minimo is installed under `/themes/minimo` directory, you'll run it as:
```sh
node ./themes/minimo/scripts/generate-search-index-algolia.js
```
The `generate-search-index-algolia.js` script accepts an optional argument for Hugo's `publishDir` (_relative to your site's root directory_).
So, if you've got a different `publishDir` (say `site`), pass it as the first argument:
```sh
node ./themes/minimo/scripts/generate-search-index-algolia.js site
```
If the generation was successful, you'll see output like this:
```
Algolia Index Generated for: /search/index.json
```
That's all. Now you can deploy your site.

View File

@@ -1,22 +0,0 @@
---
date: 2018-07-06T01:00:00+06:00
lastmod: 2018-07-20T20:00:00+06:00
title: "Search: Fuse.js"
authors: ["muniftanjim"]
categories:
- features
tags:
- search
- fuse.js
slug: search-fuse-js
toc: true
---
## Configure Fuse.js Search Client
Select Fuse.js as the search client in your `config.toml` file:
```toml
[params.search]
client = "fuse"
```

View File

@@ -1,68 +0,0 @@
---
date: 2018-07-05T20:30:00+06:00
title: "Search: Lunr.js"
authors: ["muniftanjim"]
categories:
- features
tags:
- search
- lunr.js
slug: search-lunr-js
toc: true
---
## Configure Lunr.js Search Client
Select Lunr.js as the search client in your `config.toml` file:
```toml
[params.search]
client = "lunr"
```
## Generate Search Index for Lunr.js
Lunr.js will need a search index for searching across your site. So, you'll need to generate that search index for Lunr.js before you deploy your site.
Minimo comes with a script for generating the search index for Lunr.js: `/scripts/generate-search-index-lunr.js`.
### Install Dependencies
Node.js must be installed on your system for using the generator script.
It also need the following npm packages:
- `glob`
- `lunr`
For installing `lunr` and `glob` globally use the following command:
```sh
npm install -g lunr glob
```
### Run the Script
After you've generated your site with Hugo, run `generate-search-index-lunr.js` with `node`.
If Minimo is installed under `/themes/minimo` directory, you'll run it as:
```sh
node ./themes/minimo/scripts/generate-search-index-lunr.js
```
The `generate-search-index-lunr.js` script accepts an optional argument for Hugo's `publishDir` (_relative to your site's root directory_).
So, if you've got a different `publishDir` (say `site`), pass it as the first argument:
```sh
node ./themes/minimo/scripts/generate-search-index-lunr.js site
```
If the generation was successful, you'll see output like this:
```sh
Lunr.js Index Generated for: /search/index.json
```
That's all. Now you can deploy your site.

View File

@@ -1,65 +0,0 @@
---
date: 2018-07-05T20:00:00+06:00
lastmod: 2018-07-06T01:30:00+06:00
title: "Search Support"
authors: ["muniftanjim"]
categories:
- features
tags:
- search
slug: search-support
toc: true
---
Minimo supports the following clients for the search feature:
- [Algolia](https://www.algolia.com)
- [Fuse.js](http://fusejs.io)
- [Lunr.js](https://lunrjs.com)
Follow the following steps for enabling search in your site.
## Create Search Page
First of all, you'll need to create a search page.
Create a markdown file under `/content/page/` directory with the filename `search`. If your site is multilingual, you can include language code in the filename. For example:
- `/content/page/search.md`
- `/content/page/search.en.md`
Add the following options in the frontmatter:
```yaml
type: page
layout: search
outputs:
- html
- json
```
## Select Search Client
For selecting the client for search feature, use the following options in your `config.toml` file:
```toml
[params.search]
client = ""
```
- `params.search` [`Map`]:
- `client` [`String`]: Name of the Search Client (_supported values:_ `algolia`,`fuse`,`lunr`)
## Client Specific Steps
The next steps are different for each search client:
- [**Algolia**]({{< relref "/docs/search-algolia.md" >}})
- [**Fuse.js**]({{< relref "/docs/search-fuse-js.md" >}})
- [**Lunr.js**]({{< relref "/docs/search-lunr-js.md" >}})
After you complete those steps, you are good to go!
## Add Search Widget
You might also want to add the [`search` widget]({{< relref "/docs/widgets.md#widget-search" >}}).

View File

@@ -1,186 +0,0 @@
---
date: 2017-10-05T20:00:00+06:00
lastmod: 2020-10-06T02:00:00+06:00
title: Shortcodes
authors: ["muniftanjim"]
categories:
- features
tags:
- shortcode
slug: shortcodes
toc: true
---
Minimo comes with several shortcodes built-in.
-------
## Shortcode: center
Center align you content.
### center: Parameters
- Markdown content between opening and closing tags.
### center: Usage Example
```golang
{{</* center */>}}
_Center Aligned Text_
{{</* /center */>}}
```
**Output**:
{{< center >}}
_Center Aligned Text_
{{< /center >}}
-------
## Shortcode: convo
Renders conversation blocks.
### convo: Parameters
- `sep` [`String`] \(optional\): seperator between person and text (default: "`:`")
### convo: Inner Syntax
```golang
person :: text
```
_You can remove the **`person`** part, if you want._
### convo: Usage Example
```golang
{{</* convo sep=":" */>}}
Jerry :: You don't look so tough.
Finch :: It's because I have only two modes, Jerry. Calm, and furious. It's a rare person that sees the latter and lives to talk about it.
{{</* /convo */>}}
```
**Output**:
{{< convo sep=":" >}}
Jerry :: You don't look so tough.
Finch :: It's because I have only two modes, Jerry. Calm, and furious. It's a rare person that sees the latter and lives to talk about it.
{{< /convo >}}
-------
## Shortcode: file
Include content from seperate file with syntax highlighting.
### file: Parameters
0 => filename [`String`] \(required\)
1 => filetype [`String`] \(optional\)
### file: Usage Example
```golang
{{</* file "content/_index.md" */>}}
```
**Output**:
{{< file "content/_index.md" >}}
-------
## Shortcode: katex
Renders KaTeX.
### katex: Parameters
0 => mode [`String`] \(optional\): inline / block
### katex: Usage Example
```golang
Inline: {{</* katex inline */>}} ax^2 + bx + c = 0 {{</* /katex */>}}
Block:
{{</* katex */>}}
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
{{</* /katex */>}}
```
**Output**:
Inline: {{< katex inline >}} ax^2 + bx + c = 0 {{< /katex >}}
Block:
{{< katex >}}
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
{{< /katex >}}
-------
## Shortcode: text
Text with custom size and color
### text: Parameters
You can use either Named or Unnamed Parameters
**Named Parameters**:
- `s` or `size` [`String`] \(optional\): multiplier relative to the normal size
- `c` or `color` [`String`] \(optional\): name / hex / rgb / rgba
**Unnamed Parameters**:
0 => textsize [`String`] \(required\): multiplier relative to the normal size
1 => textcolor [`String`] \(optional\): name / hex / rgb / rgba
### text: Usage Example
```golang
{{</* text s="1.4" color="purple" */>}}
font-size: 1.4em;
color: purple;
{{</* /text */>}}
```
**Output**:
{{< text s="1.4" color="purple" >}}
font-size: 1.5em;
color: purple;
{{< /text >}}
## Shortcode: slideshare
As default Hugo's shortcodes for Twitter, Instagram, Vimeo, Youtube you can embed [SlideShare](https://www.slideshare.net/) presentation/document into your page.
### slideshare: Parameters
**Named Parameters**:
- `id` [`String`] \(required\): `id` of SlideShare you want to embed. You can find it in
SlideShare URL or click "Share" -> See `id` field in "WordPress Shortcode" section.
### slideshare: Usage Example
```golang
{{</* slideshare 237760779 */>}}
```
**Output**:
{{< slideshare id="237760779" >}}

View File

@@ -1,28 +0,0 @@
---
date: 2018-02-07T19:15:00+06:00
lastmod: 2018-03-29T05:20:00+06:00
title: Sidebar
authors: ["muniftanjim"]
categories:
- features
tags:
- config
slug: sidebar
menu: sidebar
---
## Enabling Sidebar
For enabling Sidebar, use the following configuration options in your **`config.toml`** file:
```toml
[params.sidebar]
enable = true
```
- `params.sidebar` [`Map`]:
- `enable` [`Boolean`]: Switch for enabling sidebar
## Adding Widgets to Sidebar
For adding Widgets to the Sidebar, check the [Widgets documentation]({{< relref "/docs/widgets.md#available-widget-areas" >}}).

View File

@@ -1,14 +0,0 @@
---
date: 2017-09-27T12:00:00+06:00
title: Syntax Highlighting
authors: ["muniftanjim"]
categories:
- features
tags:
- pygments
- chroma
slug: syntax-highlighting
---
Hugo uses Chroma as it's built-in syntax-highlighter.
For detailed information about Syntax Highlighting in Hugo, check the [Hugo's Syntax Highlighting Documentation](https://gohugo.io/content-management/syntax-highlighting/).

View File

@@ -1,27 +0,0 @@
---
date: 2017-09-27T14:00:00+06:00
title: Translation Support
authors: ["muniftanjim"]
categories:
- features
tags:
- translation
- i18n
slug: translation
---
You can translate Minimo in your own language!
For example, if you want to translate Minimo in Spanish, you will have to add this to your site's config file:
```toml
[languages.es]
lang = "es"
languageName = "Spanish"
weight = 1
```
Then create a folder named **`/i18n/`** in your site's root. And create a file **`/i18n/es.toml`** with the translated strings.
For reference template you can see the [en.toml](https://github.com/MunifTanjim/minimo/blob/master/i18n/en.toml) file.
If you want your translation file to be included in Minimo repository, feel free to create a pull request.

View File

@@ -1,45 +0,0 @@
---
date: 2017-09-25T06:00:00+06:00
lastmod: 2018-02-08T14:45:00+06:00
title: Updating Guide
authors: ["muniftanjim"]
categories:
- Tutorial
slug: updating
toc: true
---
## Updating Minimo
#### Update Minimo clone
Just replace the `themes/minimo` folder with the latest version of Minimo clone, i.e. delete the old folder and clone again:
```sh
rm -rf themes/minimo
git clone --depth 1 https://github.com/MunifTanjim/minimo themes/minimo
```
Then, commit the changes:
```sh
git add themes/minimo
git commit -m "update [theme]: minimo"
```
#### Update Minimo submodule
```sh
cd themes/minimo
git checkout master
git fetch && git pull
cd ../..
git add themes/minimo
git commit -m "update [theme]: minimo"
```
## To Do After Updating Minimo
After updating Minimo, always check that your site's **`config.toml`** file matches the latest [**`config.toml`** file]({{< relref "/docs/config-file.md" >}}) format.
A good idea is to double check all the [Configuration settings]({{< relref "/docs/installation.md#configuration-for-minimo" >}}) of Minimo.

View File

@@ -1,133 +0,0 @@
---
date: 2018-02-07T18:30:00+06:00
lastmod: 2018-11-21T19:00:00+06:00
title: Widgets
authors: ["muniftanjim"]
categories:
- features
tags:
- config
- widgets
slug: widgets
toc: true
menu:
sidebar:
parent: docs
---
Minimo supports _**Widgets**_ that you can place on specific _**Widget Areas**_.
## Available Widgets
Minimo has the following built-in Widgets:
Name | Slug
----------------- | -----------------
1. About | `about`
2. Breadcrumbs | `breadcrumbs`
3. Recent Posts | `recent_posts`
4. Search | `search`
5. Sidebar Menu | `sidebar_menu`
6. Social Menu | `social_menu`
7. Taxonomy Cloud | `taxonomy_cloud`
### Widget Configuration Options
Here are the configuration options available for the Widgets:
#### Widget: About
- `about` [`Map`]:
- `title` [`String`]: Title
_default: `.Site.Title`_
- `description` [`String`]: Description
_default: `.Site.Params.info.description`_
- `logo` [`String`]: path/url of Logo
_default: `"/images/logo.png"`_
#### Widget: Breadcrumbs
- `breadcrumbs` [`Map`]:
- `separator` [`String`]: Breadcrumb separator
_default: `"/"`_
- `excludeParents` [`Array` of `String`s]: Types of parents to exclude
_default: `["page"]`_
#### Widget: Recent Posts
- `recent_posts` [`Map`]:
- `title` [`String`]: Title
_default: `"Recent Posts"`_
- `length` [`Integer`]: Number of posts to show
_default: `5`_
- `excludeTypes` [`Array` of `String`s]: Types of posts to exclude
_default: `["page"]`_
#### Widget: Search
- `search` [`Map`]:
- `title` [`String`]: Title
_default: `"Search"`_
#### Widget: Sidebar Menu
- `sidebar_menu` [`Map`]:
- `title` [`String`]: Title
_default: `""`_
- `mirror` [`String`]: Name of menu to mirror (e.g. `"main"`)
_default: `""`_
#### Widget: Social Menu
- `social_menu` [`Map`]:
- `title` [`String`]: Title
_default: `""`_
- `platforms` [`Array` of `String`s]: Social platform to show
#### Widget: Taxonomy Cloud
- `taxonomy_cloud` [`Map`]:
- `title` [`String`]: Title
_default: Plural Name for `taxonomyCloud.taxonomy`_
- `taxonomy` [`String`]: Taxonomy to show
_default: `.Site.Params.info.description`_
- `shuffle` [`Boolean`]: Shuffle Taxonomy Terms
_default: `true`_
## Available Widget Areas
Name | Slug
-------- | ----------
Header | `header`
Homepage | `homepage`
Sidebar | `sidebar`
Footer | `footer`
You can add Widgets to Widget Areas from your **`config.toml`** file:
```toml
[params.widgets]
header = ["breadcrumbs"]
homepage = ["recent_posts"]
sidebar = ["about","taxonomy_cloud"]
footer = ["social_menu"]
```
The syntax for adding Widgets to Widget Areas is:
```toml
widget_area_slug = [ widget_slug_1, widget_slug_2, ...]
```
## Widgets Configuration File
Minimo picks up Widgets' configuration from the **`/data/config/widgets.toml`** file.
Here's the _Widgets Config file_ for this site:
**`/data/config/widgets.toml`**
{{< file "data/config/widgets.toml" >}}
If configuration for any Widgets are missing in this file, Minimo will fallback to the default configuration for those Widgets.
Go wild!

View File

@@ -1,12 +0,0 @@
---
title: About
description: What does Minimo even means?!
menu: main
weight: -210
---
Mínimo is a Spanish word that roughly translate to Minimal.
Minimo is a minimalist theme for Hugo.
Minimo keeps the focus on your content and lets it shine!

View File

@@ -1,8 +0,0 @@
---
title: Search
type: page
layout: search
outputs:
- html
- json
---

View File

@@ -1,65 +0,0 @@
---
date: 2017-09-28T08:00:00+06:00
title: Typography
authors: ["muniftanjim"]
slug: typography
menu: main
weight: -230
---
Here is a paragraph. **Lorem ipsum _dolor_ sit amet**, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
## Heading 2
Another one. Ut enim ad minim veniam, _quis nostrud exercitation **ullamco** laboris nisi ut aliquip ex ea commodo consequat_. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
{{% center %}}
### Heading 3
Yet another, but centered! Excepteur sint occaecat ~~cupidatat non proident, sunt in culpa qui officia~~ deserunt mollit anim id est laborum.
{{% /center %}}
#### Heading 4
1. First item
2. Second item
- Nested unordered item
3. Third item
1. Nested ordered item 1
2. Nested ordered item 2
##### Heading 5
Where are the quotes!!!
> Simplify, then add lightness.
— Colin Chapman
Now, [time for some links](/typography#heading-5)!
- [GoHugo]
- [Hugo Themes][1]
[GoHugo]: https://gohugo.io
[1]: https://themes.gohugo.io/
###### Heading 6
Inline code: `echo "What is the meaning of life?"`. Who knows?
```javascript
// Codeblock
var meaningOfLife = 42;
console.log('The meaning of life is: ', meaningOfLife);
```
---
Who wants some table?
Minimo | Caption | More Caption
-------- | --------- | ------------
Cool | What? | Now, wut?!
Ah, enough for today, eh?

View File

@@ -1,3 +0,0 @@
---
title: Configuration
---

View File

@@ -1,3 +0,0 @@
---
title: Opengraph
---

View File

@@ -1,13 +0,0 @@
id = "muniftanjim"
[email]
username = "muniftanjim"
host = "gmail.com"
[name]
display = "Munif Tanjim"
[social]
email = ""
facebook = "MunifTanjim"
twitter = "MunifTanjim"

View File

@@ -1,8 +0,0 @@
_id: 85b5b000-33c9-11e8-b7f2-af13eee21e7d
honeypot: ''
permalink: /docs/comments-support/
content: Comment's on Minimo is now powered by **Staticman**'s superpower!
author: Munif Tanjim
email: 058944a54775b387da964cb3cc3670ff
site: 'https://muniftanjim.com'
date: 1522357200000

View File

@@ -1,9 +0,0 @@
_id: c7062840-33ca-11e8-b7f2-af13eee21e7d
honeypot: ''
permalink: /docs/comments-support/
parent_id: 85b5b000-33c9-11e8-b7f2-af13eee21e7d
content: "_\"I suppose everyone feels that he's the hero in his own story, but there are no heroes, no villains, just people doing the best they can.\"_ \r\n--- Harold Finch"
author: Munif Tanjim
email: 058944a54775b387da964cb3cc3670ff
site: ''
date: 1522359000000

View File

@@ -1,36 +0,0 @@
# About Widget config
[about]
title = "" # default: .Site.Title
description = "" # default: .Site.Params.info.description
logo = "/images/logo.png" # default: "/images/logo.png"
# Breadcrumbs Widget config
[breadcrumbs]
separator = "/" # default: "/"
excludeParents = ["page"] # default: ["page"]
# Recent Posts Widget config
[recent_posts]
title = "" # default: "Recent Posts"
length = 4 # default: 5
excludeTypes = ["page"] # default: ["page"]
# Search Widget config
[search]
title = "" # default: "Search"
# Sidebar Menu Widget config
[sidebar_menu]
title = "" # default: ""
mirror = "" # default: ""
# Social Menu Widget config
[social_menu]
title = "" # default: ""
platforms = ["github","facebook","twitter","instagram","email","codepen","gitlab","linkedin","telegram","google_scholar","youtube"]
# Taxonomy Cloud Widget config
[taxonomy_cloud]
title = "" # default: Plural Name for `taxonomyCloud.taxonomy`
taxonomy = "tags" # default: "tags"
shuffle = true # default: true

View File

@@ -1 +0,0 @@
/* Custom CSS */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 KiB

View File

@@ -1 +0,0 @@
/* Custom JS */

View File

@@ -1,21 +0,0 @@
comments:
allowedFields: ['author', 'content', 'email', 'parent_id', 'permalink', 'site']
branch: 'master'
commitMessage: "add [comment]: by {fields.author} <Staticman>\n\n{fields.permalink}#comment-{@id}"
filename: '{@id}'
format: 'yaml'
generatedFields:
date:
type: date
options:
format: 'timestamp'
moderation: false
name: 'Minimo'
path: 'data/comments/{options.postId}'
requiredFields: ['author', 'content', 'email', 'permalink']
reCaptcha:
enabled: false
# siteKey: ''
# secret: ''
transforms:
email: md5

View File

@@ -1,3 +1,3 @@
<style>
:root{--color-accent: {{- .Site.Params.settings.accentColor | default "#ffcd00" -}};}
:root{--color-accent: {{- .Site.Params.settings.accentColor | default "#8979b3" -}};}
</style>