rplus.github.io icon indicating copy to clipboard operation
rplus.github.io copied to clipboard

[POST] CMS.js

Open Rplus opened this issue 10 years ago • 0 comments

CMS.js fully client-side, #javascript site generator in the spirit of Jekyll. github repo: https://github.com/cdmedia/cms.js 網站:http://cdmedia.github.io/cms.js/ demo site: http://cdmedia.github.io/cms.js/demo/

SPA website with markdown & github api

網站結構借鏡 jekyll 因為是全 JS 的 blog (SPA) 所以它在首頁時會去打 github api 拿到全站的檔案結構 ( 然後就把所有的 markdown 全部都撈回來了是哪招... 文章一多不會卡死嗎...

基本上就是個 jQuery plugin 在撈全站的檔案 然後佔點 github api 的便宜,再藉由 marked.js 把 markdown 轉 HTML

大致這般~ 應該歸作小玩具吧(? blog 沒有 server render 總感覺毛毛的 XDDD


ps: 是說我不太曉得它為什麼不用 cdn 上的 marked.js 如: https://cdnjs.com/libraries/marked github 上的 asset 壽命超短的哩~

via: codrops 203

Rplus avatar Jan 24 '16 20:01 Rplus