|
发表于 2021-12-9 12:28:40
|
显示全部楼层
本帖最后由 dukelec 于 2021-12-9 12:34 编辑
我曾經喜歡玩各種框架,最後一次是 7 年前,給公司撘的 django cms 網站系統
後來一切回歸簡單,能用靜態網頁的,絕對用靜態,你給的這個網站,用靜態網頁絕對沒問題,包括 blog 和 news 板塊
我目前也是用靜態網頁的,具體做法是,寫好一個外框 html 模板,然後把各頁面具體內容,以目錄和 html 文件的形式存放(或者 markdown 格式)
每次更新內容後,調用一個 python 腳本,把外框模板 html 和正文內容 html 合併一下,生成最終的靜態 html 供用戶訪問
我的網站是: dukelec.com 短連接: d-l.io
blog 是分開的,上述連接前加 blog. 就行,blog 的正文內容是 markdown 寫的,也是直接放在目錄下(我的 blog 代碼是開源的)
網站原始文件如下,其中 src 是內容以及生成最終頂層 en/ 目錄下靜態 html 的 python 腳本:
(jquery 是外框 html 模板的作者用的,我寫 javascript 也早就不用這些框架了,只用 vanilla js)
- duke@duke-pc /mnt/TF/company/dukelec/website_cdbus $ tree -a -I .git
- .
- ├── .gitignore
- ├── .htaccess
- ├── css
- │ ├── bootstrap.css
- │ ├── chocolat.css
- │ ├── flexslider.css
- │ └── style.css
- ├── en
- │ ├── .gitkeep
- │ ├── cdctl-bg.html
- │ ├── cdctl-bn.html
- │ ├── cdctl-bx.html
- │ ├── cdctl-h.html
- │ ├── cdctl-hx.html
- │ ├── cdctl-px.html
- │ ├── download.html
- │ └── index.html
- ├── files
- │ ├── cdctl-bx.jpg
- │ ├── cdctl-hx.jpg
- │ ├── cdctl-p1.png
- │ ├── cdctl_bx_v10_181206.pdf
- │ ├── cdctl_bx_v12_200317.pdf
- │ ├── cdctl_bx_v3_180122.pdf
- │ ├── cdctl_bx_v4_180406.pdf
- │ ├── cdctl_bx_v5_180603.pdf
- │ ├── cdctl_bx_v6_180615.pdf
- │ ├── cdctl_bx_v7_180828.pdf
- │ ├── cdctl_h3_ref.svg
- │ └── cdctl_stm32_template.tar.bz2
- ├── fonts
- │ ├── Lato-Light.ttf
- │ ├── Lato-Regular.ttf
- │ ├── OpenSans-Regular.ttf
- │ ├── glyphicons-halflings-regular.eot
- │ ├── glyphicons-halflings-regular.svg
- │ ├── glyphicons-halflings-regular.ttf
- │ ├── glyphicons-halflings-regular.woff
- │ └── glyphicons-halflings-regular.woff2
- ├── images
- │ ├── about.jpg
- │ ├── b1.jpg
- │ ├── b2.jpg
- │ ├── b3.jpg
- │ ├── b5.jpg
- │ ├── b7.jpg
- │ ├── b8.jpg
- │ ├── close.png
- │ ├── contact.jpg
- │ ├── icon.png
- │ ├── left.png
- │ ├── logo.png
- │ ├── right.png
- │ ├── s.jpg
- │ ├── s1.jpg
- │ ├── s2.jpg
- │ ├── s3.jpg
- │ └── s4.jpg
- ├── js
- │ ├── jquery-1.11.0.min.js
- │ ├── jquery.chocolat.js
- │ └── jquery.flexslider.js
- └── src
- ├── build_dist.py
- ├── en
- │ ├── cdctl-bx.html
- │ ├── cdctl-hx.html
- │ ├── cdctl-px.html
- │ ├── download.html
- │ ├── index.html
- │ └── template
- │ ├── banner.txt
- │ ├── banner_download.txt
- │ ├── banner_full.txt
- │ ├── copyright.txt
- │ └── head.txt
- └── tw
- ├── cdctl-bg.html
- ├── cdctl-bn.html
- ├── cdctl-h.html
- ├── download.html
- ├── index.html
- └── template
- ├── banner.txt
- ├── banner_download.txt
- ├── banner_full.txt
- ├── copyright.txt
- └── head.txt
- 11 directories, 77 files
复制代码
我的服務器,除了網站、blog,還有 matrix 聊天服務、gerrit git 服務、redmine 項目管理服務、燒錄工具序列號分發服務、小文件臨時中轉分享、訪問 google 服務 等等。。。 |
|