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

bridgetown_internal_markdown_links

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bridgetown_internal_markdown_links

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

This plugin allows you to write paths in your markdown similar to how you can within liquid, serbea or erb template files, like so:

[Check out the docs](_pages/docs.erb)

Instead of:

[Check out the docs](/docs/)

(and do a find/replace throughout your site, if the slug changes for that page).

This plugin uses Bridgetown's url_for() helper in the background.

Installation

Run this command to add this plugin to your site's Gemfile:

bundle add bridgetown_internal_markdown_links

Then add the initializer to your configuration in config/initializers.rb:

init :bridgetown_internal_markdown_links

Usage

Link parsing is opt-in per collection.

Configuration

Add the following in your config/initializers.rb:

config.internal_markdown_links.collections = ["posts", "docs"]

Parsing of internal links is now happening for the collections “posts” and “docs”.

Disable per file

Set internal_markdown_links: false in the frontmatter.

Testing (TBD)

  • Run bundle exec rake test to run the test suite
  • Or run script/cibuild to validate with Rubocop and Minitest together.

Sponsored By Spinal

Spinal CMS logo

Contributing

  1. Fork it (https://github.com/SpinalCMS/bridgetown-internal-markdown-links/fork)
  2. Clone the fork using git clone to your local development machine.
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

FAQs

Package last updated on 26 Jul 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