# Gblog **Repository Path**: gitee_zsw/Gblog ## Basic Information - **Project Name**: Gblog - **Description**: 一款nice的基于 vue 的博客模板 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: https://gitee.com/gitee_zsw/Gblog - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 135 - **Created**: 2020-06-08 - **Last Updated**: 2023-07-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 本博客前端项目由GBLOG改造而来 ### 原博客模板介绍 >仓库:[码云](https://gitee.com/fengziy/Gblog) | [github](https://github.com/fengziye/Gblog) [预览demo](http://static.fengziy.cn/Gblog/) > 一款nice的基于 vue 的博客模板。 > 在一些布局样式上借鉴了[Akina For Typecho](https://zhebk.cn/Web/Akina.html)的风格,也做了一些自己的改动。 > 打算用做搭建自己的博客使用,也开源给大家希望能喜欢,欢迎star。 > 目前该博客系统仅允许管理员操作博客数据,其他用户可以使用QQ登录仅用于评论. ### 安装依赖 ``` npm install ``` ### 启动服务 ``` npm run serve ``` ### 编译打包 ``` npm run build ``` ## 报错排查 ### TypeError: this.getOptions is not a function:vue-style-loader 注意不要安装sass-loader@11.0.0及以上 npm install sass-loader@10.1.1 --save ### nginx 配置 ``` user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; location / { # 将打包好的文件夹复制到服务器上的 /home/zsw/jar 文件夹下 root /home/zsw/jar/dist; index index.html index.htm; } # 后端接口 location /dev-api/ { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 后端反向代理地址 proxy_pass http://localhost:10027/; } } include /etc/nginx/conf.d/*.conf; } ```