Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Disqus and Google Analytics #45

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

kentnek
Copy link
Collaborator

@kentnek kentnek commented Jun 24, 2020

We can easily integrate Disqus and Google Analytics by utilizing Hugo's existing internal templates. Users can opt in by specifying configs.

image

Also I reformatted layouts/_default/single.html since it was a little bit messy.

@kentnek kentnek requested a review from jakewies June 24, 2020 07:44
@@ -13,7 +11,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google-site-verification" content="8cyiY374WL2LGr87fBghcdJCRx6BaPNBvLjeZlk6tyc" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. I think I left this in on accident from when I ported my old site to a theme. That's not good 😵

@@ -3,28 +3,34 @@
{{ end }}

{{ define "main" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2 2006" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2 2006" }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting has been an issue in this project I've noticed. Probably a lack of symmetry in formatting tools. Maybe we can consider something like prettier in the future.

@jakewies jakewies merged commit a9a6f0c into jakewies:master Jun 24, 2020
@kentnek kentnek deleted the kent-disqus-ga branch June 24, 2020 16:31
@bgriffen
Copy link

bgriffen commented Oct 8, 2021

How is disqus added from the config file? I still can't seem to get it to show up in posts. Site renders fine.

I've got


[params]
   #...
  disqusShortname = "{mydisqusshortname}"

[privacy]
  [privacy.disqus]
    disable = false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants