Giter Site home page Giter Site logo

halo-theme-react's Introduction

Halo Theme Xue

追求个性与至简

GitHub release (latest by date)

感谢https://github.com/ykfe/egg-react-ssr

说明

预览

个人网站

特性

  • 前后端分离,使用React编写
  • 日志页面
  • 友链页面
  • 适配移动端
  • 代码行号显示
  • 链接页面分组显示
  • 相册页面
  • 随机文章封面

更新日志

  • 2020-11-30 使用React重写主题

使用指南

本地开发

git clone https://github.com/xzhuz/halo-theme-react.git
cd halo-theme-react
# 安装
npm install

修改配置

根据自己本机环境修改 app/service/axios-config.js

const baseUrl = process.env.NODE_ENV === 'production' ? 'http://127.0.0.1:8090' : 'http://127.0.0.1:8090';
const apiAuth = process.env.NODE_ENV === 'production' ? '111111111111111' : '111111111111111';

启动

npm start

发布到服务器

npm run deploy

连接halo接口

只用配置Nginx就可以,下面给一个模板。

 server {
        listen       80;
        server_name  xxx.com;

         location / {
             proxy_pass http://localhost:7001;
             proxy_set_header X-Forwarded-Host $host;
             proxy_set_header X-Forwarded-Server $host;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Host $host:$server_port;
         }
                 
         location /api/ {
             proxy_pass http://localhost:8080;
             proxy_set_header X-Forwarded-Host $host;
             proxy_set_header X-Forwarded-Server $host;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Host $host:$server_port;
         }
                 
         location /upload/ {
             proxy_pass http://localhost:8080;
             proxy_set_header X-Forwarded-Host $host;
             proxy_set_header X-Forwarded-Server $host;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Host $host:$server_port;
         }

          location /admin/ {
             proxy_pass http://localhost:8080;
             proxy_set_header X-Forwarded-Host $host;
             proxy_set_header X-Forwarded-Server $host;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Host $host:$server_port;
           }

         }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.