二維碼
        企資網

        掃一掃關注

        當前位置: 首頁 » 企資快報 » 戶外 » 正文

        GitHub+Hexo_搭建博客網站

        放大字體  縮小字體 發布日期:2022-01-12 10:24:26    作者:付世蓓    瀏覽次數:11
        導讀

        Hexo是一款基于Node.js得靜態博客框架,依賴少易于安裝使用,可以方便得生成靜態網頁托管在GitHub和Heroku上,是搭建博客得一家框架。配置Githubroot等hello:~/cby# git config --global user.name "cby-chen

        Hexo是一款基于Node.js得靜態博客框架,依賴少易于安裝使用,可以方便得生成靜態網頁托管在GitHub和Heroku上,是搭建博客得一家框架。

        配置Github

        root等hello:~/cby# git config --global user.name "cby-chen"root等hello:~/cby# git config --global user.email "cby等chenby"root等hello:~/cby# ssh-keygen -t rsa -C "cby等chenby"Generating public/private rsa key pair.Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsaYour public key has been saved in /root/.ssh/id_rsa.pubThe key fingerprint is:SHA256:57aHSNuHDLRsy/UVOQKwrUmpKOqnkEbRuRc8jNrGVpU cby等chenbyThe key's randomart image is:+---[RSA 3072]----+| .o. || . = .E +. || . + * + .. . || = o.oo.o . + || o.*...oS.. . o ||.oo.. *o. . ||+. + Oo+ . ||+ . =.=.+ || oo .o |+----[SHA256]-----+root等hello:~/cby# cat /root/.ssh/authorized_keys id_rsa id_rsa.pub known_hosts #需要配置到github上#github/settings/ssh/newroot等hello:~/cby# ssh git等githubThe authenticity of host 'github (20.205.243.166)' can't be established.ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.Are you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: Permanently added 'github,20.205.243.166' (ECDSA) to the list of known hosts.PTY allocation request failed on channel 0Hi cby-chen! You've successfully authenticated, but GitHub does not provide shell access.Connection to github closed.root等hello:~/cby#

        *將id_rsa.pub文件中得內容粘貼進去

        安裝nvm工具

        root等hello:~/cby# curl -o- raw.githubusercontent/nvm-sh/nvm/v0.39.1/install.sh | bashroot等hello:~/cby# nvm install --ltsInstalling latest LTS version.Downloading and installing node v16.13.1...Downloading nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz...############################################################################################################################################### 100.0%Computing checksum with sha256sumChecksums matched!Now using node v16.13.1 (npm v8.1.2)root等hello:~/cby# nvm use --ltsNow using node v16.13.1 (npm v8.1.2)root等hello:~/cby# root等hello:~/cby# node -vv16.13.1root等hello:~/cby#

        配置hexo環境,并修改主題

        root等hello:~/cby# npm install -g hexo-cli root等hello:~/cby# npm install hexo -groot等hello:~/cby# npm update hexo -g root等hello:~/cby# hexo initINFO Cloning hexo-starter github/hexojs/hexo-starter.gitINFO Install dependenciesINFO Start blogging with Hexo!#修改主題root等hello:~/cby# rm -rf scaffolds source themes _config.landscape.yml _config.yml package.json yarn.lockroot等hello:~/cby# git clone github/V-Vincen/hexo-theme-livemylife.gitroot等hello:~/cby# mv hexo-theme-livemylife/* ./root等hello:~/cby# rm -rf hexo-theme-livemyliferoot等hello:~/cby# npm install

        修改配置文件

        root等hello:~/cby# vim _config.ymlroot等hello:~/cby# root等hello:~/cby# root等hello:~/cby# cat _config.yml#略# Deployment## Docs: hexo.io/docs/deployment.html##deploy: type: git repo: github/cby-chen/cby-chen.github.io.git # or gitee/<yourAccount>/<repo> branch: masterroot等hello:~/cby# root等hello:~/cby# hexo clean root等hello:~/cby# hexo g root等hello:~/cby# hexo d#注意,輸入密碼是需要輸入token,創建時需要勾選所有權限#github/settings/tokens/new

         
        (文/付世蓓)
        免責聲明
        本文僅代表作發布者:付世蓓個人觀點,本站未對其內容進行核實,請讀者僅做參考,如若文中涉及有違公德、觸犯法律的內容,一經發現,立即刪除,需自行承擔相應責任。涉及到版權或其他問題,請及時聯系我們刪除處理郵件:weilaitui@qq.com。
         

        Copyright ? 2016 - 2025 - 企資網 48903.COM All Rights Reserved 粵公網安備 44030702000589號

        粵ICP備16078936號

        微信

        關注
        微信

        微信二維碼

        WAP二維碼

        客服

        聯系
        客服

        聯系客服:

        在線QQ: 303377504

        客服電話: 020-82301567

        E_mail郵箱: weilaitui@qq.com

        微信公眾號: weishitui

        客服001 客服002 客服003

        工作時間:

        周一至周五: 09:00 - 18:00

        反饋

        用戶
        反饋

        主站蜘蛛池模板: 精品欧洲av无码一区二区14| 精品福利一区二区三区免费视频| 精品久久久久中文字幕一区| 国产无线乱码一区二三区| 久久久av波多野一区二区| 国产福利电影一区二区三区,免费久久久久久久精 | 亚洲一区二区三区首页| 四虎精品亚洲一区二区三区| 成人H动漫精品一区二区| 久久一区二区三区免费播放| 国产精品一区二区三区久久| 在线一区二区三区| 亚洲一区二区三区乱码在线欧洲| 一区二区乱子伦在线播放| 日韩一区二区三区在线观看| 国产在线精品一区二区| 国产精品视频免费一区二区三区| 日韩精品一区在线| 国产在线精品观看一区| 波多野结衣一区二区免费视频| 日本免费一区二区三区最新| 日本精品一区二区三区视频| 国产一区二区三区小说| 中文精品一区二区三区四区| 亚洲AV无码一区二区一二区| 午夜福利无码一区二区| 精品国产一区二区三区AV | 日韩精品视频一区二区三区 | 精品无码一区二区三区在线| 亚洲综合色一区二区三区小说| 久久久久人妻一区精品性色av| 无码乱码av天堂一区二区| 伊人色综合网一区二区三区 | 福利一区二区三区视频午夜观看| 国产一区二区三区在线| 国产一区二区三区在线免费观看| 国产aⅴ一区二区| 中文字幕一区视频一线| 久久se精品动漫一区二区三区| 日本激情一区二区三区| 国产精品日韩欧美一区二区三区|