by treve · 9y ago · 0 comments
How does one tell nginx the names of the files to push if they are generated dynamically? You have to put the names in a separate file and then somehow configure the server using that file?
I have no idea why the original comment by the author is shadow banned.
<link href="{{ "main.css"|asseturl }}" rel="stylesheet" type="text/css" />
Then, your _headers.j2 file should look like this: /*
Link: <{{ "main.css"|asseturl }}>; rel=preload; as=stylesheet
Which will just be replaced with the correct value, same as in your HTML template.