Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8000, 5432, 5433],
"forwardPorts": [3000, 5432, 5433, 8000, 8001],

"portsAttributes": {
"3000": {
Expand All @@ -84,6 +84,10 @@
"8000": {
"label": "Datatracker",
"onAutoForward": "notify"
},
"8001": {
"label": "Static",
"onAutoForward": "silent"
}
},

Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ services:
volumes:
- ./docker/configs/pgadmin-servers.json:/pgadmin4/servers.json

static:
image: ghcr.io/ietf-tools/static:latest
restart: unless-stopped
ports:
- 8001:80

mq:
image: rabbitmq:3-alpine
restart: unless-stopped
Expand Down
2 changes: 2 additions & 0 deletions docker/configs/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@
SLIDE_STAGING_PATH = 'test/staging/'

DE_GFM_BINARY = '/usr/local/bin/de-gfm'

STATIC_IETF_ORG = "http://localhost:8001"
2 changes: 1 addition & 1 deletion ietf/doc/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def pdfized(self):
stylesheets.append(finders.find("ietf/css/document_html_txt.css"))
else:
text = self.htmlized()
stylesheets.append("https://static.ietf.org/fonts/noto-sans-mono/import.css")
stylesheets.append(f'{settings.STATIC_IETF_ORG}/fonts/noto-sans-mono/import.css')

cache = caches["pdfized"]
cache_key = name.split(".")[0]
Expand Down
3 changes: 2 additions & 1 deletion ietf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
# Absolute path to the directory static files should be collected to.
# Example: "/var/www/example.com/static/"


SERVE_CDN_PHOTOS = True

SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE = True
Expand All @@ -157,6 +156,8 @@
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

STATIC_IETF_ORG = "https://static.ietf.org"

WSGI_APPLICATION = "ietf.wsgi.application"

AUTHENTICATION_BACKENDS = ( 'ietf.ietfauth.backends.CaseInsensitiveModelBackend', )
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
{% block title %}No title{% endblock %}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://static.ietf.org/fonts/inter/import.css" rel="stylesheet">
<link href="https://static.ietf.org/fonts/noto-sans-mono/import.css" rel="stylesheet">
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/inter/import.css" rel="stylesheet">
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/noto-sans-mono/import.css" rel="stylesheet">
<link rel="stylesheet" href="{% static 'ietf/css/ietf.css' %}">
<link rel="stylesheet" href="{% static 'ietf/css/select2.css' %}">
<style>
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/doc/document_html.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
{% endif %}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://static.ietf.org/fonts/inter/import.css" rel="stylesheet">
<link href="https://static.ietf.org/fonts/noto-sans-mono/import.css" rel="stylesheet">
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/inter/import.css" rel="stylesheet">
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/noto-sans-mono/import.css" rel="stylesheet">
{% if request.COOKIES.pagedeps == 'inline' %}
<script>{{ js|safe }}</script>
<style>{{ css|safe }}</style>
Expand Down