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

create-markdown-to-resume

v1.0.1

Published

Markdown 转个人简历。

Downloads

4

Readme

markdown-to-resume

Markdown 转个人简历。

特性

  • 基于 Vite 的开发、简历预览、打包的丝滑体验
  • 生成 HTML、PDF
  • 基于 Github Actions 实现的 Github Pages 自动部署以及 PDF 自动生成

使用方式

创建简历

pnpm create markdown-to-resume

编辑简历

# 启动服务
pnpm dev

# 编辑 `src/resume.md`

构建简历

# 启动服务
pnpm build

配置自动部署

  1. 仓库中增加名为 ACTION_TOKENActions secrets,参考:Actions生成 secrets
  2. 修改 .github/workflows/gh-pages.yml48 行为 Github Pages 要绑定的自定义域名,或删除 46 至 48 行。
  3. 提交代码。
  4. 配置 Github Pages

如果一切顺利,恭喜你之后只需要:修改 => 提交 => 等待自动部署完成

配置

配置文件: vite.config.js

所有配置都需要在 Vite 的插件配置中进行,目前支持的配置如下:

import { defineConfig } from 'vite';
import resumeBuild from './src/plugin';
import markdownItImsize from 'markdown-it-imsize';

export default defineConfig({
  base: './',
  plugins: [
    resumeBuild({
      // 对 markdown-it 的实例进行配置
      markdown(md) {
        // 增加一个 markdown-it 插件
        md.use(markdownItImsize);
      },

      // 生成的 PDf 名称
      pdfName: '岳晓亮个人简历',

      // PDF 的边距,会被 `@page { margin: 0px; }` 样式覆盖
      pdfMargin: 0,

      // 生成的 HTML 的 Title
      webTitle: '岳晓亮个人简历 - markdown-to-resume'
    })
  ]
});

Markdown 编写

本项目使用 markdown-it 进行解析,并且默认安装了某些 markdown-it 插件对 Markdown 进行语法增强。

markdown-it-container

增强布局

使用前:

<!-- render after -->
# 岳晓亮
求职意向:高级前端 / 25K / 北京

<!-- render before -->
<h1>岳晓亮</h1>
<p>求职意向:高级前端 / 25K / 北京</p>

使用后:

<!-- render after -->
:::
# 岳晓亮
求职意向:高级前端 / 25K / 北京
:::

<!-- render before -->
<div class="container">
  <h1>岳晓亮</h1>
  <p>求职意向:高级前端 / 25K / 北京</p>
</div>

markdown-it-attrs

添加 html 属性,如:classid

使用前:

<!-- render after -->
:::
# 岳晓亮
求职意向:高级前端 / 25K / 北京
:::

<!-- render before -->
<div class="container">
  <h1>岳晓亮</h1>
  <p>求职意向:高级前端 / 25K / 北京</p>
</div>

使用后:

<!-- render after -->
::: {.header}
# 岳晓亮 {.name}
求职意向:高级前端 / 25K / 北京
:::

<!-- render before -->
<div class="header">
  <h1 class="name">岳晓亮</h1>
  <p>求职意向:高级前端 / 25K / 北京</p>
</div>

示例

岳晓亮个人简历