mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #2929 from MinchinWeb/mimetypes-webfonts
Add MIME types for web fonts
This commit is contained in:
commit
33ef2c5356
1 changed files with 12 additions and 0 deletions
|
|
@ -43,6 +43,18 @@ def parse_arguments():
|
||||||
class ComplexHTTPRequestHandler(server.SimpleHTTPRequestHandler):
|
class ComplexHTTPRequestHandler(server.SimpleHTTPRequestHandler):
|
||||||
SUFFIXES = ['.html', '/index.html', '/', '']
|
SUFFIXES = ['.html', '/index.html', '/', '']
|
||||||
|
|
||||||
|
extensions_map = {
|
||||||
|
**server.SimpleHTTPRequestHandler.extensions_map,
|
||||||
|
** {
|
||||||
|
# web fonts
|
||||||
|
".oft": "font/oft",
|
||||||
|
".sfnt": "font/sfnt",
|
||||||
|
".ttf": "font/ttf",
|
||||||
|
".woff": "font/woff",
|
||||||
|
".woff2": "font/woff2",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
def translate_path(self, path):
|
def translate_path(self, path):
|
||||||
# abandon query parameters
|
# abandon query parameters
|
||||||
path = path.split('?', 1)[0]
|
path = path.split('?', 1)[0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue