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

Default Options Remove Google Fonts #1

Open
emmercm opened this issue Feb 3, 2019 · 2 comments
Open

Default Options Remove Google Fonts #1

emmercm opened this issue Feb 3, 2019 · 2 comments

Comments

@emmercm
Copy link

emmercm commented Feb 3, 2019

Here's an example:

<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700" rel="stylesheet">

I have not been able to find a combination of metalsmith-plugin-kit options to make this stop happening.

@fidian
Copy link
Contributor

fidian commented Feb 4, 2019

I will need to see a more complete example to understand the problem. The plugin kit does not modify content on its own.

@emmercm
Copy link
Author

emmercm commented Feb 4, 2019

Plugin kit is doing the regex pattern creation from what I can tell, that's the part I see wrong with this - I don't want it to turn that URL into a regex that won't match anything and then the tag gets removed entirely.

Here's an example HTML layout:

<!DOCTYPE html>
<html lang="en">
<head>
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet">
    <style>body { font-family: 'Open Sans', sans-serif !important; }</style>
    <link rel="stylesheet" href="/static/css/**/*.css">
</head>

<body>
<script src="/static/js/**/*.js"></script>
</body>
</html>

I would expect non-local resources, potentially those with a scheme, not to glob since they won't match to anything in the filesystem.

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