Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jekyll-turbolinks

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jekyll-turbolinks

  • 0.0.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Turbolinks is a Javascript library for accelerating web navigation by preventing the browser to reload the full page, thus making it reload Javascript and CSS.

This plugin enables Turbolinks in all generated pages and adds Liquid tags to insert turbolinks.js into your template in case you want to include in your Javascript.

How to use it

Setup

Add jekyll-turbolinks to your Gemfile:

group :jekyll_plugins do
  gem 'jekyll-turbolinks'
end

And add it to your _config.yml file:

plugins:
  - jekyll-turbolinks

# Optional
turbolinks:
  enabled: true # Set to false if you want to use the tag
  url: turbolinks.js

You can also control if you want a page to have turbolinks disabled by adding this to its front matter:

---
turbolinks: false
---

Automatic

That's it! Turbolinks will be loaded and enabled by default.

Keep in mind that if you're not using relative urls you must set the turbolinks path to an absolute path, like so:

turbolinks:
  url: /turbolinks.js

Manual

To add it manually call the turbolinks Liquid tag to insert the actual contents of turbolinks.js into your Javascript file.

---
# The triple dashes are needed for Jekyll to process this file as a
# Liquid template
---

{% turbolinks %}

// ... rest of your Javascript

And call it from your _layouts/default.html file:

<head>
  <script type="text/javascript" src="path/to/file.js"></script>
</head>

License

Copyright (c) 2019 Sutty hi@sutty.nl

jekyll-turbolinks is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

jekyll-turbolinks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with jekyll-turbolinks. If not, see https://www.gnu.org/licenses/.

FAQs

Package last updated on 26 Jan 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc