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.
octopress-asset-pipeline
Advanced tools
Combine and compress and fingerprint Stylesheets (CSS and Sass) and Javascripts (JS and Coffeescript) to a single fingerprinted .css or .js file.
How it works: This plugin will automatically read .js, .coffee, .css, .scss and .sass files from your site, combine, compress and fingerprint them so they're ready for deployment. Then add the liquid tags to your site layout to write the necessary script or link tags.
Add this gem to your site's Gemfile in the :jekyll_plugins
group:
group :jekyll_plugins do
gem 'octopress-asset-pipeline'
end
Then install the gem with Bundler
$ bundle
$ gem install octopress-asset-pipeline
Then add the gem to your Jekyll configuration.
gems:
-octopress-asset-pipeline
This should be very simple to use.
stylesheets/
or css/
directory in your site's source.stylesheets/
or css/
directory in your site's source.[source]/javascripts/
.If you want, you can configure which directories this plugin reads from. See the configuration section below.
Include these tags in your site's layout.
{% css_asset_tag %}
{% js_asset_tag %}
When Jekyll builds your site, these will be replaced with something like this.
<link href='/stylesheets/all-b5c56f2652600cde201589531c453ba1.css' media='all' rel='stylesheet' type='text/css'>
<script src='/javascripts/all-75489c7b2da6efce7ee1bc45795d400b.js'></script>
This plugin integrates with the core asset pipeline system in Octopress Ink, therefore
the configurations are set in the _config.yml
configuration file under the asset_pipeline
key.
Option | Description | Default |
---|---|---|
stylesheets_dir | Directory to read stylesheets from | ['css', 'stylesheets'] |
javascripts_dir | Directory to read javascripts from | ['js', 'javascripts'] |
combine_css | Combine all .css, .scss and .sass files | true |
combine_js | Combine all .js and .coffee files | true |
compress_css | Compress stylesheets for production | true |
compress_js | Compress Javascripts for production | true |
order_js | Order for .js and .coffee files | [] |
order_css | Order for .css, .scss, and .sass | [] |
uglifier | Settings for Javascript Uglifier. Documentaion. | {} |
By default when scripts and stylesheets are combined, they are added based on their order in the file system. You can manually specify order like this:
asset_pipeline:
order_js:
- jquery.js
- kittens.coffee
order_css:
- normalize.css
- site.sass
Assets will ordered as specified. Any additional assets will be appended based on their order in the file system.
Note: It is not necessary to write full paths in these configurations. An asset at javascripts/lib/jquery.js
will match jquery.js
and be ordered accordingly.
Usually it's better to define print styles inside of the main CSS file beneath a print media query, like this.
@media print {
* { background: none }
* { color: #000 }
...
}
If you want to specify a separate print stylesheet, include @print
in your filename, before the extension.
When your site is compiled, this file will be written separately and its <link>
tag will include a media='print'
attribute.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that octopress-asset-pipeline 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.