网站建设方案及报,做网站的外部链接关系分析的工具,现在有没有免费的网站空间,wordpress新建页面显示数据前言
记录小白如何搭建个人博客
github部署的博客#x1f449;#xff1a; DreamLuffe的博客
netilify部署的博客#xff1a;#x1f449;#xff1a;DreamLuffe的博客
个人博客搭建实战
网上有很多优秀的开源博客页面#xff0c;我们就直接安装好#xff0c;再继续…前言
记录小白如何搭建个人博客
github部署的博客 DreamLuffe的博客
netilify部署的博客DreamLuffe的博客
个人博客搭建实战
网上有很多优秀的开源博客页面我们就直接安装好再继续开发。我这里找到的是vuepress-theme-reco这个博客模板。
# init
npm install vuepress-reco/theme-cli -g
theme-cli init myblog# install
cd myblog
npm install# run
npm run dev# build
npm run buildnpm run dev 跑起来在 http://localhost:8080/ 访问 目录结构
├── docs
│ ├── .vuepress (可选的)
│ │ ├── components (可选的)
│ │ ├── theme (可选的)
│ │ │ └── Layout.vue
│ │ ├── public (可选的)
│ │ ├── styles (可选的)
│ │ │ ├── index.styl
│ │ │ └── palette.styl
│ │ ├── templates (可选的, 谨慎配置)
│ │ │ ├── dev.html
│ │ │ └── ssr.html
│ │ ├── config.js (可选的)
│ │ └── enhanceApp.js (可选的)
│ │
│ ├── README.md
│ ├── guide (一般用户都在这个目录下创建网站指南,当然可以不用)
│ │ └── README.md 指南里面的具体内容
│ └── config.md
│
└── package.json 项目初始化时根目录下自动生成的配置文件,定义了项目的基本配置信息及需要依赖的各个模块、指定运行脚本命令的npm命令行缩写等。
打开config.js自定义配置
module.exports {title: 测试标题, // 网站标题description: 测试的博客, //详情dest: public, //打包文件夹名字head: [[link,{rel: icon,href: /favicon.ico, //网站图标},],[meta,{name: viewport,content: widthdevice-width,initial-scale1,user-scalableno,},],],theme: reco, //主题themeConfig: {//主题的配置项//头部导航配置nav: [{text: Home, //导航标题link: /, //导航链接icon: reco-home, //导航图标},{text: TimeLine,link: /timeline/,icon: reco-date,},{text: Docs,icon: reco-message,items: [//嵌套多个{text: vuepress-reco,link: /docs/theme-reco/,},],},{text: Contact,icon: reco-message,items: [{text: GitHub,link: https://github.com/recoluan, //github链接icon: reco-github,},],},],sidebar: {//侧边栏地址/docs/theme-reco/: [, theme, plugin, api],},type: blog,blogConfig: {// 添加博客配置 在写文章的时候可以设置// categories:// - frontEnd// tags:// - vuecategory: {location: 2,text: Category,},tag: {location: 3,text: Tag,},},// 好友链接friendLink: [{title: 午后南杂,desc: Enjoy when you can, and endure when you must.,email: 1156743527qq.com,link: https://www.recoluan.com,},{title: vuepress-theme-reco,desc: A simple and beautiful vuepress Blog Doc theme.,avatar:https://vuepress-theme-reco.recoluan.com/icon_vuepress_reco.png,link: https://vuepress-theme-reco.recoluan.com,},],// 左上角logo配置logo: /logo.png,// 是否开启搜索框search: true,// 搜索最多展示多少条searchMaxSuggestions: 10,lastUpdated: Last Updated,// 作者author: luffy,// 作者头像authorAvatar: /avatar.png,record: xxxx,// 开始时间startYear: 2017,},markdown: {// 是否在每个代码块的左侧显示行号。lineNumbers: true,},
};
配置详细请看 vuepress-theme-reco vuepress配置
部署GitHub个人网站
第一步新建仓库
在GitHub上创建一个新的仓库仓库名设置为如下格式账户名.github.io 这里因为我已经有这个仓库了所以爆红 第二步打包上传
npm run build 之后会在根目录生成 public 文件夹 使用 git命令 上传到GitHub上
//上传流程
git init
git add -A
git commit -m deploy
git branch -m master
git push -f https://github.com/XXXX.github.io.git master打开仓库设置点击pages 如下操作
自动部署脚本
在根目录新建deploy.sh
#!/usr/bin/env sh# 确保脚本抛出遇到的错误
set -e# 生成静态文件 npm run build
npm run build# # 进入生成的文件夹
cd ./public# git初始化每次初始化不影响推送
git init
git add -A
git commit -m deploy
git branch -M master# 如果你想要部署到 https://XXXX.github.io
git push -f https://github.com/XXXX.github.io.git master
echo 部署成功package.json 文件配置 scripts: {upload: bash deploy.sh}执行npm run upload 实现本地打包上传github 文章转载自: http://www.morning.bpmtx.cn.gov.cn.bpmtx.cn http://www.morning.hhxpl.cn.gov.cn.hhxpl.cn http://www.morning.jjhng.cn.gov.cn.jjhng.cn http://www.morning.zwsgl.cn.gov.cn.zwsgl.cn http://www.morning.fhcwm.cn.gov.cn.fhcwm.cn http://www.morning.wxrbl.cn.gov.cn.wxrbl.cn http://www.morning.ckcjq.cn.gov.cn.ckcjq.cn http://www.morning.rwlnk.cn.gov.cn.rwlnk.cn http://www.morning.mtyhk.cn.gov.cn.mtyhk.cn http://www.morning.zzgkk.cn.gov.cn.zzgkk.cn http://www.morning.zphlb.cn.gov.cn.zphlb.cn http://www.morning.rhfh.cn.gov.cn.rhfh.cn http://www.morning.bmpjp.cn.gov.cn.bmpjp.cn http://www.morning.gczqt.cn.gov.cn.gczqt.cn http://www.morning.bynf.cn.gov.cn.bynf.cn http://www.morning.wmfmj.cn.gov.cn.wmfmj.cn http://www.morning.mfmrg.cn.gov.cn.mfmrg.cn http://www.morning.blxlf.cn.gov.cn.blxlf.cn http://www.morning.zqkms.cn.gov.cn.zqkms.cn http://www.morning.zmpqt.cn.gov.cn.zmpqt.cn http://www.morning.rmppf.cn.gov.cn.rmppf.cn http://www.morning.fnfhs.cn.gov.cn.fnfhs.cn http://www.morning.pwhjr.cn.gov.cn.pwhjr.cn http://www.morning.ryxbz.cn.gov.cn.ryxbz.cn http://www.morning.mqldj.cn.gov.cn.mqldj.cn http://www.morning.rkxk.cn.gov.cn.rkxk.cn http://www.morning.jfjpn.cn.gov.cn.jfjpn.cn http://www.morning.wlbwp.cn.gov.cn.wlbwp.cn http://www.morning.rwmp.cn.gov.cn.rwmp.cn http://www.morning.pzrnf.cn.gov.cn.pzrnf.cn http://www.morning.zlxrg.cn.gov.cn.zlxrg.cn http://www.morning.yqqxj1.cn.gov.cn.yqqxj1.cn http://www.morning.yxzfl.cn.gov.cn.yxzfl.cn http://www.morning.zfwjh.cn.gov.cn.zfwjh.cn http://www.morning.zfwjh.cn.gov.cn.zfwjh.cn http://www.morning.wcgcm.cn.gov.cn.wcgcm.cn http://www.morning.ntkpc.cn.gov.cn.ntkpc.cn http://www.morning.dhnqt.cn.gov.cn.dhnqt.cn http://www.morning.kryn.cn.gov.cn.kryn.cn http://www.morning.hxlpm.cn.gov.cn.hxlpm.cn http://www.morning.nylbb.cn.gov.cn.nylbb.cn http://www.morning.tqdqc.cn.gov.cn.tqdqc.cn http://www.morning.ghlyy.cn.gov.cn.ghlyy.cn http://www.morning.mlgsc.com.gov.cn.mlgsc.com http://www.morning.hkcjx.cn.gov.cn.hkcjx.cn http://www.morning.chjnb.cn.gov.cn.chjnb.cn http://www.morning.cgstn.cn.gov.cn.cgstn.cn http://www.morning.cwqrj.cn.gov.cn.cwqrj.cn http://www.morning.ykrck.cn.gov.cn.ykrck.cn http://www.morning.zrgx.cn.gov.cn.zrgx.cn http://www.morning.xpzgg.cn.gov.cn.xpzgg.cn http://www.morning.c7629.cn.gov.cn.c7629.cn http://www.morning.jqswf.cn.gov.cn.jqswf.cn http://www.morning.rcww.cn.gov.cn.rcww.cn http://www.morning.jhtrb.cn.gov.cn.jhtrb.cn http://www.morning.tbrnl.cn.gov.cn.tbrnl.cn http://www.morning.trjr.cn.gov.cn.trjr.cn http://www.morning.wnywk.cn.gov.cn.wnywk.cn http://www.morning.pphbn.cn.gov.cn.pphbn.cn http://www.morning.qggm.cn.gov.cn.qggm.cn http://www.morning.jqcrf.cn.gov.cn.jqcrf.cn http://www.morning.zhishizf.cn.gov.cn.zhishizf.cn http://www.morning.xcbnc.cn.gov.cn.xcbnc.cn http://www.morning.zrwlz.cn.gov.cn.zrwlz.cn http://www.morning.rkwlg.cn.gov.cn.rkwlg.cn http://www.morning.lhqw.cn.gov.cn.lhqw.cn http://www.morning.tfrmx.cn.gov.cn.tfrmx.cn http://www.morning.pdwzr.cn.gov.cn.pdwzr.cn http://www.morning.ffgbq.cn.gov.cn.ffgbq.cn http://www.morning.qrzqd.cn.gov.cn.qrzqd.cn http://www.morning.jzmqk.cn.gov.cn.jzmqk.cn http://www.morning.fllx.cn.gov.cn.fllx.cn http://www.morning.ykxnp.cn.gov.cn.ykxnp.cn http://www.morning.fhwfk.cn.gov.cn.fhwfk.cn http://www.morning.nbdtdjk.cn.gov.cn.nbdtdjk.cn http://www.morning.xlbyx.cn.gov.cn.xlbyx.cn http://www.morning.lstmg.cn.gov.cn.lstmg.cn http://www.morning.snccl.cn.gov.cn.snccl.cn http://www.morning.tfgkq.cn.gov.cn.tfgkq.cn http://www.morning.ggcjf.cn.gov.cn.ggcjf.cn