readthedocs / ext-theme

Read the Docs drop in replacement site templates
2 stars 2 forks source link

Project: use a custom template filter to avoid zh languages #417

Closed humitos closed 2 months ago

humitos commented 2 months ago

We keep returning 500 on projects with zh. This another interation on this fix for now.

Sentry https://read-the-docs.sentry.io/issues/5066249292/ Related #370

humitos commented 2 months ago

I couldn't fix the linting regarding inline CSS styles because we need them. However, fixing those are outside the scope of this PR.

humitos commented 2 months ago

We need a way to ignore these...

readthedocsext/theme/templates/projects/partials/header.html
───────────────────────────────────────────────────────────────────────────────
H021 47:10 Inline styles should be avoided. <div class="eight wi
H021 110:10 Inline styles should be avoided. <div class="right al

Linted 2 files, found 2 errors.
humitos commented 2 months ago

I'll proceed and merge this since the linting issues are not related to this PR. We can fix them in another one.

agjohnson commented 2 months ago

You can add a djlint rule. The documentation covers how to exclude rules globally and skip locally in templates.