小伙伴们
26 | 27 |{{ item.title }}
36 |{{ item.desc }}
37 |├── .env ├── .env.development ├── .env.production ├── .env.sit ├── .gitignore ├── .travis.yml ├── README.md ├── babel.config.js ├── gh-pages.sh ├── package.json ├── public ├── favicon.ico ├── index.html └── manage.html ├── src ├── 404.vue ├── api │ └── baseUrlConfig.js ├── assets │ ├── 404.png │ ├── avatar │ │ └── admin.jpg │ ├── banner1.jpg │ ├── banner2.jpg │ ├── banner3.jpg │ ├── banner4.jpg │ ├── banner5.jpg │ ├── error.jpg │ ├── errorImg.jpg │ ├── laravel.png │ ├── loginlogo.png │ ├── logo.png │ ├── message.jpg │ ├── nav-map.jpg │ └── vue.jpg ├── components │ ├── MyLoading.js │ ├── MyPage.js │ ├── NewPage.js │ ├── SpinLoading.js │ ├── TextLoading.js │ ├── myLoading.vue │ ├── newPage.vue │ ├── page.vue │ ├── spinLoading.vue │ └── textLoading.vue ├── directive │ └── index.js ├── modules │ ├── index │ │ ├── App.vue │ │ ├── api │ │ │ ├── article.js │ │ │ ├── baseUrlConfig.js │ │ │ ├── comment.js │ │ │ ├── common.js │ │ │ ├── index.js │ │ │ ├── message.js │ │ │ └── user.js │ │ ├── components │ │ │ ├── commonPage.vue │ │ │ ├── footer.vue │ │ │ ├── headnav.vue │ │ │ └── skills.vue │ │ ├── main.js │ │ ├── page │ │ │ ├── about.vue │ │ │ ├── blog.vue │ │ │ ├── detail.vue │ │ │ ├── donate.vue │ │ │ ├── link.vue │ │ │ └── message.vue │ │ ├── router │ │ │ ├── index.js │ │ │ └── router.js │ │ └── user │ │ │ ├── login.vue │ │ │ ├── password.vue │ │ │ ├── person.vue │ │ │ ├── recover.vue │ │ │ └── register.vue │ └── manage │ │ ├── App.vue │ │ ├── api │ │ ├── baseUrlConfig.js │ │ └── index.js │ │ ├── headnav.vue │ │ ├── home.vue │ │ ├── leftnav.vue │ │ ├── login.vue │ │ ├── main.js │ │ ├── page │ │ ├── ad.vue │ │ ├── addArticle.vue │ │ ├── article.vue │ │ ├── comment.vue │ │ ├── link.vue │ │ ├── message.vue │ │ ├── password.vue │ │ ├── setting.vue │ │ └── users.vue │ │ └── router │ │ ├── manage.js │ │ └── router.js ├── plugins │ ├── element.js │ ├── highlightjs.js │ ├── iview.js │ ├── mavonEditor.js │ └── vuescroll.js ├── store │ ├── index.js │ └── modules │ │ ├── blog.js │ │ ├── todos.js │ │ └── user.js ├── style │ ├── common.styl │ ├── hybrid.styl │ ├── index.styl │ ├── message.styl │ └── table.styl └── utils │ ├── common.js │ ├── directive.js │ ├── fetch.js │ ├── httpIndex.js │ ├── httpManage.js │ └── loginStatus.js ├── vue.config.js ├── vue.config.twoEntry.js └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | VUE_APP_API_URL = http://api.golang365.top/api/v2 2 | VUE_APP_STATIC_URL = http://img.golang365.top/ 3 | VUE_APP_AVATAR_URL = https://api.dicebear.com/7.x/bottts-neutral/svg 4 | VUE_APP_OUTPUT_DIR = dev 5 | -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | // 开发环境 2 | VUE_APP_API_URL = http://localhost:8080/api/v2 3 | // VUE_APP_STATIC_URL = http://localhost:9000/ 4 | VUE_APP_STATIC_URL = https://img.golang365.top/ 5 | VUE_APP_OUTPUT_DIR = dev -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | // 生产环境 2 | BASE_URL = https://api.golang365.top/api/v2 3 | VUE_APP_API_URL = https://api.golang365.top/api/v2 4 | VUE_APP_STATIC_URL = https://img.golang365.top/ 5 | VUE_APP_AVATAR_URL = https://api.dicebear.com/7.x/bottts-neutral/svg 6 | VUE_APP_OUTPUT_DIR = prod -------------------------------------------------------------------------------- /.env.sit: -------------------------------------------------------------------------------- 1 | // sit环境 2 | NODE_ENV = 'sit' 3 | VUE_APP_API_URL = http://localhost:8080/api/v2 4 | // VUE_APP_STATIC_URL = http://localhost:9000/ 5 | VUE_APP_STATIC_URL = http://static.golang365.top/ 6 | VUE_APP_OUTPUT_DIR = sit 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | /prod 5 | /gh-pages 6 | 7 | # local env files 8 | .env.local 9 | .env.*.local 10 | 11 | # Log files 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw* 24 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | 5 | cache: npm 6 | 7 | script: npm run build 8 | 9 | deploy: 10 | provider: pages 11 | skip_cleanup: true 12 | github_token: $GITHUB_TOKEN 13 | local_dir: dist 14 | on: 15 | branch: master -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-blog v2 重构 2 | 3 | **base on vue-cli3** 4 | 博客页面:[http://www.golang365.top](http://www.golang365.top) 5 | 后台页面:[http://www.golang365.top/manage.html#/login](http://www.golang365.top/manage.html#/login) 6 | 7 | 1.多页面配置,博客页面和后台页面分离 8 | 2.图片上传又拍云 9 | 3.博客页面用 iview UI 10 | 4.后台页面用 element UI 11 | 12 | ### vue-cli3 13 | 14 | ### 安装依赖 15 | 16 | ``` 17 | npm install 18 | ``` 19 | 20 | ### 启动项目 21 | 22 | ``` 23 | npm run serve 24 | ``` 25 | 26 | ### 打包 27 | 28 | ``` 29 | npm run build 30 | ``` 31 | 32 | ### 打包并提交代码到分支 gh-pages,服务器就可以直接拉取 gh-pages 的代码 33 | 34 | ```bash 35 | # 打包提交到sit分支 36 | npm run deploy:sit 37 | # 打包提交到prod分支 38 | npm run deploy 39 | ``` 40 | 41 | ### 环境变量 42 | 43 | ``` 44 | .env # 在所有的环境中被载入 45 | .env.local # 在所有的环境中被载入,但会被 git 忽略 46 | .env.[mode] # 只在指定的模式中被载入 47 | .env.[mode].local # 只在指定的模式中被载入,但会被 git 忽略 48 | 49 | process.env.VUE_APP_VERSION 50 | 以 VUE_APP_ 开头 51 | ``` 52 | 53 | ### `vue.config.js`开发环境文件配置 54 | 55 | 这是多页面配置,2 个入口,`index.html`指向`/`路由,`manage.html`指向`manage.html#/`路由 56 | 57 | ```js 58 | pages: { 59 | index: { 60 | // 应用入口配置,相当于单页面应用的main.js,必需项 61 | entry: 'src/modules/index/main.js', 62 | // 应用的模版,相当于单页面应用的public/index.html,可选项,省略时默认与模块名一致 63 | template: 'public/index.html', 64 | // 编译后在dist目录的输出文件名,可选项,省略时默认与模块名一致 65 | filename: 'index.html', 66 | // 标题,可选项,一般情况不使用,通常是在路由切换时设置title 67 | // 需要注意的是使用title属性template 中的 title 标签需要是
从 2017 年开始写博客记录自己技术成长的一点一滴,用过了多种博客,从最开始的博客园,到Hexo,再到WordPress。
14 |但是每个都有各自的缺点和局限性,逼格档次也不够,本着不折腾会死的心,决定自己写一个,功能必须齐全的,于是瞎折腾了2个月(倾心制作),本站终于诞生了。
15 |如果该项目对你有帮助,希望可以给个star
37 |施伟达,90后、毕业于广东一所野鸡大学的电子信息专业,沉迷于编程不能自拔。
50 |与时俱进的电脑迷、技术控、真会修电脑的程序猿。
51 |15年开始接触前端,一路单刷副本,16年底开始学习后端语言,打怪升级,目标成功合格的全栈攻城狮。
52 |目前已习得技能
54 |{{ item.desc }}
37 |Say Hello~
7 | 8 |尚未拥有账户?
33 |
{{user.name}}
11 |第{{user.id}}位注册的用户
12 |注册于{{user.created_at.substring(0,10)}}
13 |
40 |
您的密码已经修改成功,请牢记新密码。现在可以重新登录了。
7 | 8 |已经拥有账户?
32 |