
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
hexo-generator-redirect
Advanced tools
hexo-generator-redirect
is a plugin for Hexo static site generator that generates additional redirect pages. It's useful if you migrate your website and changed addresses for some posts.
The plugin generates additional HTML page for "outdated" URLs. These pages will contain information on where the page was moved to.
$ npm install hexo-generator-redirect --save-dev
redirect_from
key into frontmatter of the page:layout: post
title: Page
redirect_from:
- /old-url1
- /old-url2
Create redirect.ejs
in the layout
folder of your theme.
You can use the post
variable in the template. To access the target page information, use page.target.path
.
Here is an example of the redirect page layout (redirect.ejs
):
<% const newUrl = full_url_for(page.target.path) %>
<h1>Page address was changed</h1>
<p>The new page address is <a href="<%= newUrl %>"><%= newUrl %></a></p>
<script type="text/javascript">
setTimeout(function(){ document.location.href = '<%= newUrl %>'; }, 5000);
</script>
FAQs
Hexo plugin that generates additional redirect pages
We found that hexo-generator-redirect 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.