Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SupportRequest] Path Settings when deploying to GitLab Site #4

Open
13bmartens opened this issue Jun 23, 2023 · 2 comments
Open

[SupportRequest] Path Settings when deploying to GitLab Site #4

13bmartens opened this issue Jun 23, 2023 · 2 comments

Comments

@13bmartens
Copy link

Hi Team,
I am trying to deploy your awesome theme to a Gitlab site.

The URL of the page is [organization].gitlab.io/[project].
The main site loads with the following settings:

astro.config.mjs

  sitemap: true,
  
  outDir: 'public',
  publicDir: 'static',

  site: 'https://[organization].gitlab.io/[project]',
  base: '/[project]',
  
  output: 'static',

All paths and images are broken and the links resolve not to https://[organization].gitlab.io/[project]/page but https://[organization].gitlab.io/page .

Any input what I am doing wrong?

Thank you for your feedback!

@tfsomrat
Copy link
Contributor

Hello @13bmartens, thanks for choosing our theme. I am not sure why it's not loading correctly. but you can try to change the base URL from config file. hope it will work.

@13bmartens
Copy link
Author

I changed that, in most cases (like Header.astro) this base_url is not used.
When I import
const { base_url } = config.site;
in Header.astro
and change the elements to:
<a href={base_url + child.url} class="nav-dropdown-link">
it works.

You are already doing something similar in Social.astro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants