npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

shark-blog

v1.0.2

Published

一个简单易用的静态博客框架

Downloads

5

Readme

SHARK-BLOG

一个简单易用的静态博客框架

这真是一个极好的博客解决方案。 --尼古拉斯·赵四

Wow , such a easy static blog framework. --Isaac·Two·Dog

安装

npm install shark-blog -g

预览

AEPKILL-BLOG

快速上手

创建一个新的博客并启动一个本地服务器来预览:

blog create my-blog
cd my-blog
blog start

shark-blog.json

新创建的博客下有一个 shark-blog.json文件,这个是博客的配置文件,它包含以下可配置项:

  1. title 博客的 title
  2. description 简短的描述
  3. site 博客部署的网站域名
  4. pageSize 每页包含多少博客项
  5. author 博客作者
  6. concat 博客作者联系方式
  7. language 博客语言
  8. rootDir 博客根目录
  9. postDir 博客文章存放的目录,相对于博客根目录
  10. theme 博客主题
  11. publicPath 博客的公共路径,这个值现在没用到,保留
  12. htmInject 一个数组,存放要注入博客元数据的 html 文件
  13. extra 这个值是给主题用的,由具体的博客主题决定

定制主题

如果要自己写主题的话,参考 src目录下的默认主题源码。

为啥要写这个

一开始我是用 hexo的,但是我要使用两个仓库来管理我的博客,一个是用于存放博客源码一个则是用于发布。

而且当我使用在文章中插入图片的时候,我得需要先把图片上传到图床,然后获取链接在粘贴到文章里面。

还有一个次要的原因就是 hexo g有点慢,每次更新都要卡上十来秒。

shark-blog就是为了解决以上问题的,所有的博客文章都只需要存放在 post 目录下就好了,不用单独占用一个仓库,然后可以用相对路径来插入图片,比如在 post/xxx.md 中,你可以使用 ../img/logo.png 来访问 img/logo.png 这个图片。

shark-blog 的更新处理速度也非常快,一千篇博客大概 1 秒钟就处理好了。

大概就这些原因吧。

参(chao)考(xi)设计

License

MIT © AEPKILL