Adding Twitter Feed

Hi, I am using the Hugo Midnight Theme, and I am trying to add a twitter feed into the side bar.

I have used the Twitter Publish to create a feed to add. I have created a file in the directory, /layouts/partials/sidebar/twitter/twitter.html. In this file, I have,

<div class="widget">
	<a class="twitter-timeline" data-lang="en" data-theme="dark" href="">Tweets by KnightsOfEanna</a>
	<script async src="" charset="utf-8"></script> 

In my config.toml file, I have,

    path = "sidebar/twitter"
        path = "sidebar/twitter/twitter.html"
        cache = true

I have followed all the steps I can think of, but, appearing on the sidebar is " Tweets by KnightsOfEanna", which is a link to the twitter feed, however the feed itself is not showing on the sidebar.

Here is the git project:

Any assistance would be most appreciated. Thank you!

If you share your site and follow the advice at Requesting Help we’ll be able to see what’s up. :slight_smile:

Also, I edited your post to include code blocks, and you reverted it. I don’t edit-war with folks, but I think your code examples should be in code fences, so we can read them easier.

1 Like

Thank you. Sorry for edit-waring, I tried fixing the issue with my code, but didn’t realise you were helping me fix it. Didn’t realise someone else was editing as well. I’ve attached a link to a git repository with the website so far.

1 Like

When you load the site and look at the web console (javascript console / section) in your browser, is the script loading?

Also, how is that cache = true being used?


cache = true was part of the instructions on how to set up a plugin.

I checked the JavaScript console and figured out that the issue is I have a browser plugin installed for security that was blocking the JavaScript. Thank you for your help!


That’ll do it. In trying to protect my privacy more, sometimes it gets in the way of basic testing just like you say, because I forget to disable plugins.

1 Like