Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Plate is a simple static site generator and blogging engine. At its core, it takes a folder full of Markdown files and turns it into a static HTML site that you can host anywhere.
In addition to basic formatting with Markdown, Plate also supports generating more dynamic files with ERB or HAML, and compiling asset files with CoffeeScript, Sass and and Less.
Plate is a command line utility installed as a Ruby Gem. Installation requires Ruby 1.8.7, 1.9.2, 1.9.3 or 2.0.0.
gem install plate
Or, create a Gemfile
and add:
gem 'plate'
To generate a new site with plate, run the following command in the directory you want a new site in:
platify .
To build your entire site, just run
plate
Add a --verbose
tag to show some additional output about what is happening behind the scenes.
To create a new blog post with the default options, run:
plate post "Your Post Name Here"
You can also put default post options (such as a category or layout) into the command line:
plate post "Your Post Name Here" --category Articles --layout post
If you always end up using the same basic options for every new post, you can add these options as defaults in your config file.
Plate observes the following folder structure in your site:
Plate is designed to be easily extended. To get started, create a directory named lib
in the root of your site. Any Ruby files (ending in .rb
) will be automatically loaded with the Plate DSL.
When using dynamic page templates, such as erb
or haml
, you can access Ruby helper methods that are baked in to Plate, or add your own. For more information about helpers, see the helpers doc.
When creating a new post, you can choose to put it in the drafts folder, instead of the posts folder, to hide it from display until the post is complete. Once the post is ready for publishing, just add the following line to the meta data section at the top of the post:
publish: true
On the next site build, your post will automatically be moved to the appropriate spot in the posts folder.
By default, the plate post [Title]
command does not use the drafts folder. To enable draft usage by default when a new post is generated, just change the following line in the config/plate.yml
file to true:
posts:
draft: true
Plate supports basic partial usage within dynamic pages. If your page is using Erb or Haml, you'll have access to partials. Partial files begin with an underscore, but are referenced in the render
command without the underscore.
To display the contents of a partial located in content/partials/_header.html
, use the following syntax:
render 'partials/header'
Partials also support local variables. To pass custom variables through to the partial view, just include a hash in the render
call. Note that only dynamic template partials (such as those ending in .erb or .haml) will be able to take advantage of local variables.
render 'partials/header', :my => 'local', :vars => 'here'
View the full documentation on rdoc.info
If you have any issues or find bugs running Plate, please report them on Github. While most functions should be stable, Plate is still in its infancy and certain issues may be present.
Plate is fully tested using Test Unit, Shoulda and Mocha. To run the test suite, bundle install
then run:
rake test
Plate is released under the MIT license
Contributions and pull-requests are more than welcome.
FAQs
Unknown package
We found that plate 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.