fix trailingSlash

This commit is contained in:
sevichecc 2022-12-10 02:40:13 +08:00
parent f0b5baec3a
commit 2a58c54703
4 changed files with 7 additions and 10 deletions

View file

@ -1,9 +1,6 @@
import type { LayoutLoad } from './$types' import type { LayoutLoad } from './$types'
export const prerender = true export const prerender = true
export const trailingSlash = export const trailingSlash = 'always'
!Object.keys(process.env).some(key => ['VERCEL', 'CF_PAGES', 'NETLIFY'].includes(key)) && process.env.ADAPTER !== 'node'
? 'always'
: undefined
export const load: LayoutLoad = async ({ url, fetch }) => ({ export const load: LayoutLoad = async ({ url, fetch }) => ({
path: url.pathname, path: url.pathname,
res: await fetch('/posts.json').then(res => res.json()) res: await fetch('/posts.json').then(res => res.json())

View file

@ -140,7 +140,7 @@ server {
} }
``` ```
SSL/TLS 配置可以看我之前这篇:[配置 Cloudflare 的免费 SSL 证书](2022-06-12-cloudflare),或者用 certbot 配置 SSL/TLS 配置可以看我之前这篇:[配置 Cloudflare 的免费 SSL 证书](/2022-06-12-cloudflare),或者用 certbot 配置
最后 `sudo nginx -t` 以及 `sudo systemctl reload nginx` 一下就可以在相应域名看到初始界面啦。 最后 `sudo nginx -t` 以及 `sudo systemctl reload nginx` 一下就可以在相应域名看到初始界面啦。

View file

@ -6,10 +6,10 @@ summary: logo / UI / 包装 / 儿童玩具 ……
## 二十四节气茶包 ## 二十四节气茶包
![](2022-07-13-work/1.jpg) ![](/2022-07-13-work/1.jpg)
![](2022-07-13-work/2.jpg) ![](/2022-07-13-work/2.jpg)
![](2022-07-13-work/3.jpg) ![](/2022-07-13-work/3.jpg)
![](2022-07-13-work/4.jpg) ![](/2022-07-13-work/4.jpg)
## UI 设计 ## UI 设计

View file

@ -105,7 +105,7 @@ sudo mkdir media
## 4. 配置反代和 SSL ## 4. 配置反代和 SSL
我比较懒,设置还是跟之前的[配置 Cloudflare 的免费 SSL 证书](2022-06-12-cloudflare)里面一样配置,如果不想按照这个方法来配置反代的话可以参考:[利用 Nginx 进行反代](https://mantyke.icu/posts/2021/rsshub-miniflux/#%E5%88%A9%E7%94%A8nginx%E8%BF%9B%E8%A1%8C%E5%8F%8D%E4%BB%A3)中的配置 我比较懒,设置还是跟之前的[配置 Cloudflare 的免费 SSL 证书](/2022-06-12-cloudflare)里面一样配置,如果不想按照这个方法来配置反代的话可以参考:[利用 Nginx 进行反代](https://mantyke.icu/posts/2021/rsshub-miniflux/#%E5%88%A9%E7%94%A8nginx%E8%BF%9B%E8%A1%8C%E5%8F%8D%E4%BB%A3)中的配置
```bash ```bash
sudo nano /etc/nginx/conf.d/lwt.conf sudo nano /etc/nginx/conf.d/lwt.conf