V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
THESDZ
V2EX  ›  程序员

一个基于 githubpages 和 markdown,生成博客的 sdk

  •  
  •   THESDZ · Sep 23, 2021 · 1117 views
    This topic created in 1688 days ago, the information mentioned may be changed or developed.

    地址: https://github.com/dezhiShen/github-blog-sdk

    使用marked.jsmarkdown转为html渲染到 index.html 中 示例: https://github.com/dezhiShen/github-blog-sdk/tree/master/examples

    优势:

    • 无服务器成本
    • 一次编写 index.html 和 css 后,无需再次编写 html 文件

    缺点:

    • 内部有一些实现并不优雅
    • 还不知道有没有坑

    目的: 看看有没有其他的 markdown 的处理方式,实现基于 markdown 编写的无服务器的博客

    Supplement 1  ·  Sep 23, 2021

    优势:编写完index.html后,无需再写html代码,只需要写markdown

    Supplement 2  ·  Sep 24, 2021

    目前查到一个库: https://github.com/mckamey/jsonml

    看样子可以将HTML转为结构化数据

    SmiteChow
        1
    SmiteChow  
       Sep 23, 2021
    使用 githubpages 服务器=无服务器?
    THESDZ
        2
    THESDZ  
    OP
       Sep 23, 2021
    @SmiteChow #1 无服务器成本
    zerofancy
        3
    zerofancy  
       Sep 24, 2021 via Android
    不懂前端,看上去是在浏览器实现 markdown 渲染?
    我用 Kotlin 写过一个博客静态生成器,本地处理,先 markdown 渲染,结果作为 html 模板引擎(我用的 Thymeleaf )的参数,得到多个 HTML 文件。目前来看也能达到目的。
    THESDZ
        4
    THESDZ  
    OP
       Sep 24, 2021
    @zerofancy #3 是的,但是实现方式很粗糙,直接生成 html 了,想看看 v 友有没有其他的实现,最好是结构化数据的.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3210 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 14:28 · PVG 22:28 · LAX 07:28 · JFK 10:28
    ♥ Do have faith in what you're doing.