Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.