cworld1 / astro-theme-pure

A simple, clean but powerful blog theme build by astro.
https://astro-theme-pure.vercel.app
Apache License 2.0
42 stars 10 forks source link

Copyright card 显示链接的时候多了一个斜杆 #5

Closed cn-danieldev closed 2 months ago

cn-danieldev commented 2 months ago
<!-- title & link -->
<div class='flex flex-col'>
  <div class='text-foreground'>{data.title}</div>
  <div class='text-sm'>{import.meta.env.SITE}/blog/{slug}</div>
</div>
cn-danieldev commented 2 months ago

正确写法应该为:

<div class='text-sm'>{import.meta.env.SITE}blog/{slug}</div>
cworld1 commented 2 months ago

实际规范问题其实源于这段代码的前半部分 SITE 变量。根据 Astro 官方文档,网站链接配置不应该含有斜杠。已在 #6 中修正。感谢指出。