Flaskerizer
Flaskerizer copied to clipboard
Migrate fonts to the css subfolder of static in addition to the fonts subfolder
Interestingly the template:
https://www.feedmethemes.com/themes/html/logic-free-html5-multipurpose-business-template
looks for font files in both the fonts folder and the css folder. There are 404 errors because of this that can be solved by simply copying fonts files from the fonts folder to the css folder of the flaskerized app.
Since font files are small I think the best fix to this would be to migrate a copy of a given font file to both the fonts subfolder and css subfolder of static.
I don't know the best way to do this, but one thought is to modify the dictionary in target_folders.py so that font file extensions have two subfolders instead of one:
instead of this: 'otf': {'folder': 'static', 'subfolder' : 'fonts'
like this:
'otf': {'folder': 'static',
'subfolder' : ['fonts', 'css']
I'm not sure what changes would need to be made in the StructureDirectory methods to account for this change though and there might be an easier way.
There is also some issue with missing zero padded name prefixes here that will need to be fixed:
i.e. I get
/static/css/raleway-regular-webfont.woff HTTP/1.1" 404 -
Because it is not looking for the correct
098842raleway-regular-webfont.woff
or something similar