V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
qwz

用 Clojure 写了个玩具 算是乞丐版的 Jekyll

  •  
  •   qwz · Apr 29, 2019 · 2409 views
    This topic created in 2557 days ago, the information mentioned may be changed or developed.

    你想要的 Jekyll 特性可能都没有

    repo link

    中文社区讨论 Clojure 的内容不太多 我来添一份力

    直接帖 README

    puck

    name from Puck(パック Pakku)

    What is this

    A ~~Clojure toy project~~ useful(to me), as-simple-as-posibble markdown blogging tool.

    Features

    • Markdown support
    • Templates
    • Snippets
    • Built-in HTTP server
    • No Cookies/Sessions support (wat? yeah, it's true, you don't need these things for a weblog)

    Things may have

    • RSS
    • Posts pagination
    • HTTPS

    Get start

    • clojure -A:main -w path init
    • clojure -A:main -w path start
    • check http://localhost:8080 or http://localhost:8080/posts/2018-11-01-foo-bar.html

    Directory

    ----
       |
       |-- assets       css, font, favicon etc.
       |
       |-- conf.edn     configration
       |
       |-- files        zip, tar.gz etc.
       |
       |-- pages        md files, e.g. homemd 404md
       |
       |-- posts        md files, e.g. 2018-11-01-foo-barmd
       |
       |-- snippets     html files, e.g. head.html post-list.html
       |
       |-- templates    html files, e.g. post.html page.html
       |
       |-- www          HTTP server root
         |
         |-- pages      html files, pages/homemd > pages/home.html
         |
         |-- posts      html files, posts/2018-11-01-foo-barmd > posts/2018-11-01-foo-bar.html
    

    URL

    /posts          posts, e.g. /posts/2018-11-01-foo-bar.html by dir/www/posts/2018-11-01-foo-bar.html
    
    /               index, by dir/www/pages/home.html
    
    /404.html       not-found page, by dir/www/pages/404.html
    

    CLI

    • clojure -A:main -h

    Credits

    2 replies    2019-05-16 11:56:37 +08:00
    qwz
        1
    qwz  
    OP
       Apr 29, 2019
    ...
    url 里的 ";" 字符被转换了

    再帖以下吧 https://repo.yiwan.me/?p=puck;a=summary
    jingxujuan
        2
    jingxujuan  
       May 16, 2019
    赞!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5320 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 03:29 · PVG 11:29 · LAX 20:29 · JFK 23:29
    ♥ Do have faith in what you're doing.