Skip to content

Railway部署有办法塞主题吗 #37

Answered by zdz
HinataKato asked this question in Q&A
Discussion options

You must be logged in to vote

Railway 目前没看到自定义 route 的功能, 可以直接把你的主题替换 web 目录,然后重新编译构建部署

推荐的另一种方法是你可以在 vercel.app 部署前端主题,前后端分离部署,用 routes 指向后端,功能类似 nginx 反代,优点是隐藏后端和主题保持在自己的库中,主题随便修改而无需改动 server。目前 ssr.rs 也是使用这种方式。

新建一个库,然后在 vercel 导入部署(google vercel静态站点部署),工程目录结构

~$ tree .
.
├── README.md
├── css
│   ├── bootstrap-theme.min.css
│   ├── bootstrap-theme.min.css.map
│   ├── bootstrap.min.css
│   ├── bootstrap.min.css.map
│   ├── dark.css
│   └── light.css
├── favicon.ico
├── google89dd963c5b122b1b.html
├── img
│   ├── dark.png
│   └── light.png
├── index.html
├── js
│   ├── bootstrap.min.js
│   ├── html5shiv.js
│   ├── jquery.min.js
│   ├── respond.min.js
│   └── serverstatus.js
├── netlify.toml
└── vercel.json

vercel…

Replies: 3 comments 11 replies

Comment options

You must be logged in to vote
5 replies
@HinataKato
Comment options

@zdz
Comment options

zdz May 11, 2022
Maintainer

@HinataKato
Comment options

@HinataKato
Comment options

@zdz
Comment options

zdz May 11, 2022
Maintainer

Answer selected by HinataKato
Comment options

You must be logged in to vote
4 replies
@zdz
Comment options

zdz May 11, 2022
Maintainer

@HinataKato
Comment options

@zdz
Comment options

zdz May 11, 2022
Maintainer

@zdz
Comment options

zdz May 12, 2022
Maintainer

Comment options

You must be logged in to vote
2 replies
@Tony-Yes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants