Skip to content

Commit

Permalink
feat: enable docs/next (#503)
Browse files Browse the repository at this point in the history
* feat: enable `docs/next`

* undo unrelated whitespace changes
  • Loading branch information
mdjermanovic authored Dec 27, 2023
1 parent 7019204 commit f10378f
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/_data/sites/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname: de.eslint.org
locals:
docs_latest: false
docs_head: false
docs_next: false
blog: false

#------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/_data/sites/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname: eslint.org
locals:
docs_latest: latest--docs-eslint.netlify.app
docs_head: docs-eslint.netlify.app
docs_next: next--docs-eslint.netlify.app
blog: true
redirects:
- from: https://cn.eslint.org/*
Expand Down
1 change: 1 addition & 0 deletions src/_data/sites/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname: es.eslint.org
locals:
docs_latest: false
docs_head: false
docs_next: false
blog: false

#------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/_data/sites/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname: fr.eslint.org
locals:
docs_latest: false
docs_head: false
docs_next: false
blog: false

#------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/_data/sites/hi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname: hi.eslint.org
locals:
docs_latest: false
docs_head: false
docs_next: false
blog: false

#------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/_data/sites/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname: ja.eslint.org
locals:
docs_latest: false
docs_head: false
docs_next: false
blog: false

#------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/_data/sites/pt-br.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname: pt-br.eslint.org
locals:
docs_latest: false
docs_head: false
docs_next: false
blog: false

#------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/_data/sites/zh-hans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname: zh-hans.eslint.org
locals:
docs_latest: zh-hans-docs.netlify.app
docs_head: false
docs_next: false
blog: false

#------------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions src/static/redirects.njk
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ eleventyExcludeFromCollections: true
/docs/head/* https://eslint.org/docs/head/:splat 302!
{% endif %}

# Docs for the current prerelease
{% if site.locals.docs_next %}
/docs/next/* https://{{ site.locals.docs_next }}/:splat 200!
{% else %}
/docs/next/* https://eslint.org/docs/next/:splat 302!
{% endif %}

{% if site.locals.blog == false %}
# Redirect blog back to English site
/blog/* https://eslint.org/blog/:splat 302!
Expand Down

0 comments on commit f10378f

Please sign in to comment.