国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

18143453325 在線咨詢 在線咨詢
18143453325 在線咨詢
所在位置: 首頁 > 營銷資訊 > 建站知識 > 使用Golang基于語雀構建獨立域名的輕博客系統(tǒng)

使用Golang基于語雀構建獨立域名的輕博客系統(tǒng)

時間:2023-02-07 13:12:01 | 來源:建站知識

時間:2023-02-07 13:12:01 來源:建站知識

先說結論: 語雀是目前編輯體驗最好(沒有之一)的文檔平臺,對開發(fā)者和非開發(fā)者都十分友好。強大的文本編輯功能,友好的使用體驗, 更強大的markdown語法超集,流程圖、思維導圖, 多媒體資源上傳插入(再也不用勞心勞力找圖床了)。開放的API(本文的前提,這個貌似是唯一一家開放了文章內容API接口的文檔平臺)。語雀,很geek。

一、為什么還需要DIY




二、 設計思路

---yuque: api: "https://www.yuque.com/api/v2" token: "token" user: "userxxxxx" repos: - name: "運維筆記" repo: "kkgfxm" - name: "云原生" repo: "ooa19f" - name: "DIY搞事情" repo: "bua6cb" - name: "開開腦洞" repo: "ussmi8"Blog: title: "WangXun`s Blog" subtitle: "大道至簡" keywords: "云原生,kubernetes,docker,golang,python,物聯(lián)網,運維開發(fā)" description: "" author: "WangXun" links: - name: "" url: ""

三、踩坑指南




四、填坑

func (y Config) ServeHTTP(uri string, w http.ResponseWriter, r *http.Request) { // 反向代理 remote, err := url.Parse(uri) if err != nil { panic(err) } proxy := httputil.NewSingleHostReverseProxy(remote) d := proxy.Director proxy.Director = func(r *http.Request) { r.Header.Set("Referer", "") r.Host = remote.Host d(r) } proxy.ServeHTTP(w, r)}


<link rel="stylesheet" type="text/css" href="http://editor.yuque.com/ne-editor/lake-content-v1.css"><link href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.7.2/styles/atom-one-dark.min.css" rel="stylesheet"> <script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.7.2/highlight.min.js"></script><script> window.onload = function() { var aCodes = document.getElementsByTagName('pre'); for (var i=0; i < aCodes.length; i++) { hljs.highlightBlock(aCodes[i]); } };</script>


五、大功告成

首頁

六、開源計劃

關鍵詞:系統(tǒng),獨立,使用

74
73
25
news

版權所有? 億企邦 1997-2025 保留一切法律許可權利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點擊下載Chrome瀏覽器
關閉