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

assets plugin does not fill links (also fails test) #984

Open
cycomanic opened this issue Feb 6, 2018 · 2 comments
Open

assets plugin does not fill links (also fails test) #984

cycomanic opened this issue Feb 6, 2018 · 2 comments

Comments

@cycomanic
Copy link

The assets plugin does not seem to fill in the links for me. I've also run the test_assets.py and I get a failure on the relative and absolute link tests. Test failures below:

__________________________________________________________ TestWebAssetsRelativeURLS.test_template ___________________________________________________________

self = <assets.test_assets.TestWebAssetsRelativeURLS testMethod=test_template>

    def test_template(self):
        # Look in the output files for the link tag.
    
        css_file = './theme/gen/style.{0}.min.css'.format(CSS_HASH)
        html_files = ['index.html', 'archives.html',
                      'this-is-a-super-article.html']
        for f in html_files:
>           self.check_link_tag(css_file, os.path.join(self.temp_path, f))

test_assets.py:90: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_assets.py:57: in check_link_tag
    self.assertRegexpMatches(html, link_tag)
E   AssertionError: Regexp didn't match: '<link rel="stylesheet" href="./theme/gen/style.d91ae7af.min.css">' not found in 

...


self = <assets.test_assets.TestWebAssetsAbsoluteURLS testMethod=test_absolute_url>

    def test_absolute_url(self):
        # Look in the output files for the link tag with absolute url.
    
        css_file = ('http://localhost/theme/gen/style.{0}.min.css'
                    .format(CSS_HASH))
        html_files = ['index.html', 'archives.html',
                      'this-is-a-super-article.html']
        for f in html_files:
>           self.check_link_tag(css_file, os.path.join(self.temp_path, f))

test_assets.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_assets.py:57: in check_link_tag
    self.assertRegexpMatches(html, link_tag)
E   AssertionError: Regexp didn't match: '<link rel="stylesheet" href="http://localhost/theme/gen/style.d91ae7af.min.css">'


@justinmayer
Copy link
Member

@cycomanic: Were you able to find a solution to your problem here?

@kdeldycke
Copy link
Contributor

The legacy assets plugin has been moved to a new dedicated repository at: https://github.com/pelican-plugins/webassets .

Please report there if you're still impacted by the issue. In the mean time, I guess this can be closed.

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

3 participants