Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
jekyll-disqus-plugin
Advanced tools
This is a Jekyll plugin that provides the Liquid tags to render the Disqus Javascript codes inside the theme template.
It also associates a different ID to every post using its publishing date and ensures the uniqueness of that ID among all the posts.
Although the ID can be automatically generated is still possible to declare a custom ID, which is mandatory for those pages that don't contain a publishing date but recall one of the Disqus tags in their layouts.
Inside the Gemfile add the gem name in the :jekyll_plugins
group:
group :jekyll_plugins do
...
gem 'jekyll-disqus-plugin'
end
Then run from the terminal:
$ bundle install
Inside the _config.yml
file can set up the following fields:
jekyll-disqus:
shortname:
id_prefix:
post_selector: 'include.post'
ui:
layouts:
- 'post'
counter:
layouts:
- 'all'
shortname : It is the same Shortname provided by Disqus for each site added.
id_prefix : It is a code that will be prepended to any Disqus Id, just to add another level of customization.
post_selector : This is how the script will read the post data inside a paginator layout.
ui.layouts/counter.layouts : A list of layouts where the two couple of tags will be printed.
To disable the tags for specific pages or posts, the no_disqus field can be set up to true on the front matter of the specific post or page itself.
By default, this addon associates a unique ID to each post using the related publishing date, but where needed, a disqus_id field can be declared in the front matter of the page.
---
title: ...
description: ...
author: ...
...
disqus_id: 'CUSTOM_DISQUS_ID'
...
There is a deep relationship between the disqus_id and the related post, so be sure that:
Below are the provided tags:
Tag | Description | Template |
---|---|---|
{% disqus_counter %} | The count of comments for a certain post | Post |
{% disqus_script_counter %} | The required Javascript that renders the counter | Default |
{% disqus_ui %} | The comment box | Post |
{% disqus_script_ui %} | The required Javascript that renders the comment box | Default |
The script tags must be included once for page and, providing a Javascript code, their position should be in the bottom part of the main layout, just before the end of the body HTML tag.
The disqus_ui renders the comment box and should be put in the post or page layout, depending where you want to show it, usually after the content has been printed.
The disqus_counter shows the number of comments for a post (or page), and it is bound to the specific content through the disqus_id aforementioned. Usually, it is displayed among the content data, just after the title, and it works for the full rendered post as well as the paginated content.
In the last case, the plugin will detect the post included in the pagination template using a selector.
By default, it is include.post
, but can be changed in the configuration section of the _config.yml
file.
FAQs
Unknown package
We found that jekyll-disqus-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.