Jump to content

CSS symlinks converted to source path on link output


gornycreative
 Share

Recommended Posts

Hi @bernhard

I have archives of webfonts that are symlinked to /site/fonts/archive/ from a different path.

When I pass the symlink paths to the $rfe->styles()->add method, the output on the webpage revert to the original full path of the symlink.

For example. If I have an array of stylesheets:

array
0 => '/site/assets/fonts/archive/acherusgrotesque/stylesheet.css'
1 => '/site/assets/fonts/archive/antonio/stylesheet.css'
2 => '/home/xxxxxxxx/public_html/pw/site/templates/theme/src/less/uikit.theme.less'

And I iterate through:

foreach($style_array as $style) {
	$rfe->styles()->add($style);
}

I get the following results:

  <!-- DEBUG enabled! You can disable it either via $config or use $rf->styles()->setOptions(['debug'=>false]) -->
  <!-- rockfrontend-styles-head -->
  <!-- loading /site-base/templates/theme/src/less/uikit.theme.less (_main.php:4) -->
  <!-- loading /site-base/templates/layouts/_global.less (_main.php:6) -->
  <!-- loading /site-base/templates/sections/footer.less (_main.php:6) -->
  <link href='/site-base/templates/bundle/head.css?m=1676340014' rel='stylesheet'><!-- LESS compiled by RockFrontend -->
  <link href='/home/xxxxxx/public_html/webfonts/acherusgrotesque/stylesheet.css' rel='stylesheet'><!-- _main.php:4 -->
  <link href='/home/xxxxxx/public_html/webfonts/antonio/stylesheet.css' rel='stylesheet'><!-- _main.php:4 -->

The plain stylesheet paths/locations give back the files based on the original symlinks, and obviously these don't resolve properly.

In the meantime I am going to work out a scheme to import (optional) their values in a the theme's LESS, but I figured I'd mention it in case there is a LESS parser setting you've included (or default setting) that is changing the output in this way.

Link to comment
Share on other sites

  • gornycreative changed the title to CSS symlinks converted to source path on link output

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...