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

relative path from css #390

Closed
xenlo opened this issue Nov 12, 2019 · 3 comments
Closed

relative path from css #390

xenlo opened this issue Nov 12, 2019 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@xenlo
Copy link
Contributor

xenlo commented Nov 12, 2019

Configuration

  • Operating system with its version: Fedora 31
  • Browser with its version: N/A
  • Hugo version: v0.58.3
  • Tranquilpeak version: 0.4.7-BETA
  • Do you reproduce on https://tranquilpeak.kakawait.com demo?: No

Actual behaviour

The generated link to the css file is referenced from root dir (/):

<link rel="stylesheet" href="/css/style-twzjdbqhmnnacqs0pwwdzcdbt8yhv8giawvjqjmyfoqnvazl0dalmnhdkvp7.min.css" />

Expected behaviour

That it behave the same way as the images, having the path generated with the baseURL

For example if I have baseURL: "https://xen-lo.org/serom_3/" in my config.yml it generate the following images links:

<img id="about-card-picture" src="https://xen-lo.org/serom_3/images/theme/avatar.png" alt="" />
[...]
<div id="cover" style="background-image:url('https://xen-lo.org/serom_3/images/theme/cover_01.jpg');"></div>

So for the css, I expect to have

<link rel="stylesheet" href="https://xen-lo.org/serom_3/css/style-twzjdbqhmnnacqs0pwwdzcdbt8yhv8giawvjqjmyfoqnvazl0dalmnhdkvp7.min.css" />

Steps to reproduce the behaviour

  1. Set a hugo config file with a baseURL set.
  2. Generate you site with hugo
  3. Look the the link of you stylesheet: grep "css/style" -r public/index.html
@xenlo
Copy link
Contributor Author

xenlo commented Nov 12, 2019

Identified file:

I will propose a PR later.

@kakawait kakawait added for triage An issue we've not yet triaged bug Something isn't working enhancement New feature or request and removed for triage An issue we've not yet triaged labels Dec 2, 2019
@kakawait kakawait added this to the 0.5.0 milestone Dec 2, 2019
@kakawait kakawait self-assigned this Dec 2, 2019
@kakawait
Copy link
Owner

kakawait commented Dec 2, 2019

@xenlo Thank you for reporting. Will be part of next version

xenlo added a commit to xenlo/hugo-tranquilpeak-theme that referenced this issue Sep 17, 2020
Same issue than the kakawait#390 but for the .js file which is define with a static path link to root path.
@xenlo
Copy link
Contributor Author

xenlo commented Sep 17, 2020

I found a new issue of static path when you use sub directories in your baseURL. It's is about the .js file this time.

I provided a fix in PR #453 to develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants