Skip to content

Commit

Permalink
Merge pull request sass#64 from oddbird/redirects
Browse files Browse the repository at this point in the history
Implement remainder of redirects.
  • Loading branch information
jgerigmeyer committed Jun 10, 2023
2 parents f609a14 + 2f489e4 commit d205a77
Show file tree
Hide file tree
Showing 6 changed files with 489 additions and 498 deletions.
154 changes: 79 additions & 75 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,82 +5,86 @@
"service": "web",
"workspaceFolder": "/app",
"shutdownAction": "stopCompose",
"extensions": [
"csstools.postcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"formulahendry.auto-rename-tag",
"naumovs.color-highlight",
"sissel.shopify-liquid",
"stkb.rewrap",
"stylelint.vscode-stylelint",
"syler.sass-indented",
"tyriar.sort-lines",
"xabikos.javascriptsnippets"
],
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
"customizations": {
"vscode": {
"extensions": [
"csstools.postcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"formulahendry.auto-rename-tag",
"naumovs.color-highlight",
"sissel.shopify-liquid",
"stkb.rewrap",
"stylelint.vscode-stylelint",
"syler.sass-indented",
"tyriar.sort-lines",
"xabikos.javascriptsnippets"
],
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"terminal.integrated.defaultProfile.linux": "bash",
"editor.bracketPairColorization.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"eslint.validate": ["javascript", "typescript"],
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.validate": ["css", "scss", "less", "postcss"],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"javascript.suggestionActions.enabled": false,
"typescript.preferences.quoteStyle": "single",
"typescript.tsdk": "node_modules/typescript/lib",
"[javascript]": {
"editor.rulers": [80]
},
"[markdown]": {
"editor.rulers": [80]
},
"[typescript]": {
"editor.rulers": [80]
},
"[scss]": {
"editor.rulers": [80],
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
},
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
".coverage": true,
"coverage": true,
"htmlcov": true,
".tags": true,
".cache": true,
".vscode": true,
"collected-assets": true,
"staticfiles": true,
"**/*.egg-info": true
},
"search.exclude": {
"**/*.css.map": true,
"**/*.js.map": true,
"**/node_modules": true,
".yarn/": true,
"_site/": true,
"assets/dist/": true,
"yarn-debug.log": true,
"yarn-error.log": true,
"yarn.lock": true
}
}
},
"terminal.integrated.defaultProfile.linux": "bash",
"editor.bracketPairColorization.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"eslint.validate": ["javascript", "typescript"],
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.validate": ["css", "scss", "less", "postcss"],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"javascript.suggestionActions.enabled": false,
"typescript.preferences.quoteStyle": "single",
"typescript.tsdk": "node_modules/typescript/lib",
"[javascript]": {
"editor.rulers": [80]
},
"[markdown]": {
"editor.rulers": [80]
},
"[typescript]": {
"editor.rulers": [80]
},
"[scss]": {
"editor.rulers": [80],
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
},
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
".coverage": true,
"coverage": true,
"htmlcov": true,
".tags": true,
".cache": true,
".vscode": true,
"collected-assets": true,
"staticfiles": true,
"**/*.egg-info": true
},
"search.exclude": {
"**/*.css.map": true,
"**/*.js.map": true,
"**/node_modules": true,
".yarn/": true,
"_site/": true,
"assets/dist/": true,
"yarn-debug.log": true,
"yarn-error.log": true,
"yarn.lock": true
}
}
}
1 change: 0 additions & 1 deletion eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module.exports = (eleventyConfig) => {
eleventyConfig.addPassthroughCopy('source/assets/img');
eleventyConfig.addPassthroughCopy('source/favicon.ico');
eleventyConfig.addPassthroughCopy('source/icon.png');
eleventyConfig.addPassthroughCopy('source/_redirects');
eleventyConfig.addPassthroughCopy('source/browserconfig.xml');
eleventyConfig.addPassthroughCopy('source/tile.png');
eleventyConfig.addPassthroughCopy('source/tile-wide.png');
Expand Down
30 changes: 30 additions & 0 deletions source/_data/redirects.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- from:
- /d/random-with-units
- /documentation/breaking-changes/random-with-units
- /d/color-units
- /documentation/breaking-changes/color-units
to: /documentation/breaking-changes/function-units
- from:
- /docs/yardoc/file.SASS_REFERENCE.html
- /documentation/file.SASS_REFERENCE.html
to: /documentation
- from:
- /docs/yardoc/file.SASS_CHANGELOG.html
- /documentation/file.SASS_CHANGELOG.html
to: https://github.com/sass/dart-sass/blob/main/CHANGELOG.md
- from:
- /docs/yardoc/file.INDENTED_SYNTAX.html
- /documentation/file.INDENTED_SYNTAX.html
- /docs/yardoc/file.SCSS_FOR_SASS_USERS.html
- /documentation/file.SCSS_FOR_SASS_USERS.html
to: /documentation/syntax
- from:
- /docs/yardoc/Sass/Script/Functions.html
- /documentation/Sass/Script/Functions.html
- /docs/yardoc/functions.html
- /documentation/functions.html
to: /documentation/modules
- from:
- /docs/yardoc/functions/css.html
- /documentation/functions/css.html
to: /documentation/at-rules/function/#plain-css-functions
17 changes: 0 additions & 17 deletions source/_redirects

This file was deleted.

35 changes: 35 additions & 0 deletions source/_redirects.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
permalink: '/_redirects'
eleventyExcludeFromCollections: true
---
/feed /feed.xml 200
/sitemap /sitemap.xml 200
/tutorial /guide
/download /install
/try https://www.sassmeister.com
/about /

/blog/posts/560719 /blog/dropping-support-for-old-ruby-versions
/blog/posts/1305238 /blog/dart-sass-is-on-chocolatey
/blog/posts/1404451 /blog/sass-and-browser-compatibility
/blog/posts/1909151 /blog/dart-sass-is-in-beta
/blog/posts/7081811 /blog/ruby-sass-is-deprecated

{% for r in redirects -%}
{%- for from in r.from %}
{%- for to in r.to %}
{{ from }} {{ to }}
{%- endfor -%}
{%- endfor -%}
{%- endfor %}

{%- assign mods = 'color list map math meta selector string' | split: ' ' -%}
{%- for mod in mods %}
/docs/yardoc/functions/{{ mod }}.html /documentation/modules/{{ mod }}/
/documentation/functions/{{ mod }}.html /documentation/modules/{{ mod }}/
{%- endfor -%}

{%- assign breaking = 'bogus-combinators css-vars duplicate-var-flags extend-compound function-units media-logic moz-document slash-div strict-unary' | split: ' ' -%}
{%- for b in breaking %}
/d/{{ b }}.html /documentation/breaking-changes/{{ b }}/
{%- endfor -%}
Loading

0 comments on commit d205a77

Please sign in to comment.