
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Simple YAML Frontmatter parser for Ruby.
Otterraft's installation is simple:
gem install otterraft
If you'd rather install Otterraft using bundler
, add a line for it in your Gemfile:
gem 'otterraft'
Otterraft is a simple YAML Frontmatter parser for Ruby. It can be used to parse YAML Frontmatter from a string.
text = <<~MARKDOWN_TEXT
---
title: Hello, World!
date: 2021-01-01 12:00 JST
tags:
- hello
- world
- ruby
---
# Hello, World!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- First item
- Second item
MARKDOWN_TEXT
Otterraft.parse(text)
# => { "title" => "Hello, World!", "date" => "2021-01-01 12:00 JST", "tags" => ["hello", "world", "ruby"] }
Otterraft can also be used to parse YAML Frontmatter from a file.
If you have a file named hello.md
with the following content:
---
title: How to use parse from file
date: 2024-12-31 23:59 JST
tags:
- how-to
- parse
---
# Hello, World!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
You can parse the file like this:
Otterraft.parse_file('hello.md')
# => { "title" => "How to use parse from file", "date" => "2024-12-31 23:59 JST", "tags" => ["how-to", "parse"] }
Bug reports and pull requests are welcome on GitHub at https://github.com/ydah/otterraft. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Otterraft project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that otterraft 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
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.