If I have my base setting in Astro's astro.config.mjsdefineConfig({}) of base: 'mysite',, then starlight-blog should generate links that use that config. But all links in starlight-blog are / instead.
For example base: 'mysite' should make the "blog" link in the navbar be localhost:port/mysite/blog but instead it's localhost:port/blog. Same for any links within the blog pages (if you know the url to access them and type them by hand).
I should mention my site is on Github Pages, to be colocated near my github project and since I don't want to shell out for a domain name. Github page urls are always my-account.github.io/my-repo/ so I always need to use the base for astro sites on it. I was hoping to use the blog module just for site update news.
Thanks for the nice module, hopefully I get to use it soon!
P.S. I would love the i18n #9 issue to get some love too but that's not nearly as high priority.
To Reproduce
set base setting in defineConfig(), load your site, click on any links generated by starlight-blog to get a bad link.
Expected behavior
It should take base into account.
How often does this bug happen?
Every time
System Info
No response
Additional Context
Adam M and Fryuni in Discord #starlight helped me out to make sure this wasn't just my noobness. They looked into it a bit and mentioned you may need to look at these files, but I don't know the project myself:
They also mentioned https://github.com/withastro/astro/issues/10303 which is a similar problem elsewhere but documents the solution, using import.meta.env.BASE_URL to get the prefix that should be added.
Describe the bug
If I have my
base
setting in Astro'sastro.config.mjs
defineConfig({})
ofbase: 'mysite',
, then starlight-blog should generate links that use that config. But all links in starlight-blog are/
instead.For example
base: 'mysite'
should make the "blog" link in the navbar belocalhost:port/mysite/blog
but instead it'slocalhost:port/blog
. Same for any links within the blog pages (if you know the url to access them and type them by hand).I should mention my site is on Github Pages, to be colocated near my github project and since I don't want to shell out for a domain name. Github page urls are always
my-account.github.io/my-repo/
so I always need to use thebase
for astro sites on it. I was hoping to use the blog module just for site update news.Thanks for the nice module, hopefully I get to use it soon!
P.S. I would love the i18n #9 issue to get some love too but that's not nearly as high priority.
To Reproduce
set
base
setting in defineConfig(), load your site, click on any links generated by starlight-blog to get a bad link.Expected behavior
It should take
base
into account.How often does this bug happen?
Every time
System Info
No response
Additional Context
Adam M and Fryuni in Discord #starlight helped me out to make sure this wasn't just my noobness. They looked into it a bit and mentioned you may need to look at these files, but I don't know the project myself:
They also mentioned https://github.com/withastro/astro/issues/10303 which is a similar problem elsewhere but documents the solution, using
import.meta.env.BASE_URL
to get the prefix that should be added.