Skip to content

Conversation

eerikson
Copy link

@eerikson eerikson commented Oct 9, 2017

fixes adobe-community/issues#19309

# Add again with newer mime-type
sed -i "s/}/\n font\/woff woff;\n&/" /etc/nginx/mime.types && \
# Also add mime-type for WOFF2
sed -i "s/}/\n font\/woff2 woff2;\n&/g" /etc/nginx/mime.types
Copy link
Author

@eerikson eerikson Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured more lines that did specific things was more legible and simpler to understand, a single-line version is probably possible here if we think that's a better approach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eerikson could you add the link to the nginx ticket to track as a comment before your implementation?

Copy link
Author

@eerikson eerikson Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah of course, thanks for reminding me! Added.

@bryanlatten
Copy link
Contributor

@ko-be @mannytoledo

@eerikson eerikson force-pushed the AddNewFontMimeTypes branch from ff7bbd2 to f92d6d9 Compare October 9, 2017 20:38
Dockerfile Outdated
# Remove older WOFF mime-type
sed -i "/application\/font-woff/d" /etc/nginx/mime.types && \
# Add again with newer mime-type
sed -i "s/}/\n font\/woff woff;\n&/" /etc/nginx/mime.types && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick but can we remove the second newline (\n) here, the one after the semicolon. The result will have both fonts together at the end of the file as opposed to 1 line apart.

i.e

    font/woff                             woff;
    font/woff2                            woff2;
}

instead of

    font/woff                             woff;

    font/woff2                            woff2;
}

@mannytoledo
Copy link

@eerikson One comment but very nice sed work!

fixes adobe-community/issues#19309
@eerikson eerikson force-pushed the AddNewFontMimeTypes branch from f92d6d9 to f4364d7 Compare October 9, 2017 21:02
@bryanlatten bryanlatten merged commit 1515d27 into behance:master Oct 9, 2017
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

Successfully merging this pull request may close these issues.

3 participants