mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
Check blog internal links too
This commit is contained in:
parent
0e1868ef06
commit
5690ce390b
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
@ -8,3 +8,13 @@ updates:
|
|||||||
directory: '/'
|
directory: '/'
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: 'weekly'
|
||||||
|
ignore:
|
||||||
|
- dependency-name: '@types/node'
|
||||||
|
update-types: ['version-update:semver-major']
|
||||||
|
# Major version bumps for the following dependencies require pure ESM,
|
||||||
|
# which 11ty does not yet support.
|
||||||
|
# See: https://github.com/11ty/eleventy/issues/836
|
||||||
|
- dependency-name: '@sindresorhus/slugify'
|
||||||
|
update-types: ['version-update:semver-major']
|
||||||
|
- dependency-name: 'strip-indent'
|
||||||
|
update-types: ['version-update:semver-major']
|
||||||
|
@ -35,7 +35,10 @@ module.exports = eleventyConfig => {
|
|||||||
eleventyConfig.setLibrary('liquid', liquidEngine);
|
eleventyConfig.setLibrary('liquid', liquidEngine);
|
||||||
eleventyConfig.setLibrary('md', markdownEngine);
|
eleventyConfig.setLibrary('md', markdownEngine);
|
||||||
eleventyConfig.addDataExtension('yml, yaml', contents => yaml.load(contents));
|
eleventyConfig.addDataExtension('yml, yaml', contents => yaml.load(contents));
|
||||||
eleventyConfig.addDataExtension('ts', (_, filepath) => require(filepath));
|
eleventyConfig.addDataExtension('ts', {
|
||||||
|
parser: filepath => require(filepath),
|
||||||
|
read: false,
|
||||||
|
});
|
||||||
|
|
||||||
// register filters and shortcodes
|
// register filters and shortcodes
|
||||||
eleventyConfig.addPlugin(componentsPlugin);
|
eleventyConfig.addPlugin(componentsPlugin);
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "run-p 'watch:**'",
|
"serve": "run-p 'watch:**'",
|
||||||
"build": "run-s clean-version-cache build-dev:scripts 'build:**'",
|
"build": "run-s clean-version-cache build-dev:scripts 'build:**'",
|
||||||
|
"build-prod": "run-s clean-version-cache build-prod:scripts 'build:**'",
|
||||||
"clean-version-cache": "rm -f source/_data/versionCache.json",
|
"clean-version-cache": "rm -f source/_data/versionCache.json",
|
||||||
"build-prod": "NETLIFY=true run-s clean-version-cache build-prod:scripts 'build:**'",
|
|
||||||
"build:sass": "sass --style=compressed ./source/assets/sass/sass.scss:./source/assets/dist/css/sass.css ./source/assets/sass/noscript.scss:./source/assets/dist/css/noscript.css",
|
"build:sass": "sass --style=compressed ./source/assets/sass/sass.scss:./source/assets/dist/css/sass.css ./source/assets/sass/noscript.scss:./source/assets/dist/css/noscript.css",
|
||||||
"watch:sass": "sass --watch ./source/assets/sass/sass.scss:./source/assets/dist/css/sass.css ./source/assets/sass/noscript.scss:./source/assets/dist/css/noscript.css",
|
"watch:sass": "sass --watch ./source/assets/sass/sass.scss:./source/assets/dist/css/sass.css ./source/assets/sass/noscript.scss:./source/assets/dist/css/noscript.css",
|
||||||
"build-dev:scripts": "rollup -c",
|
"build-dev:scripts": "rollup -c",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"lint": "run-s prettier gts stylelint tsc",
|
"lint": "run-s prettier gts stylelint tsc",
|
||||||
"lint:ci": "run-s prettier:ci gts:ci stylelint:ci tsc",
|
"lint:ci": "run-s prettier:ci gts:ci stylelint:ci tsc",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"checklinks:internal": "npx --yes --package=hyperlink --package=tap-spot -- 'hyperlink --canonicalroot https://sass-lang.com/ --root _site/ -r -p -i --skip \".css.map\" --skip \".js.map\" --skip \".svg\" --skip \"feed.atom\" --skip \"/documentation/js-api/\" --skip \"/blog/\" _site/index.html | tap-spot'",
|
"checklinks:internal": "npx --yes --package=hyperlink --package=tap-spot -- 'hyperlink --canonicalroot https://sass-lang.com/ --root _site/ -r -p -i --skip \".css.map\" --skip \".js.map\" --skip \".svg\" --skip \"feed.atom\" --skip \"/documentation/js-api/\" _site/index.html | tap-spot'",
|
||||||
"checklinks:external": "npx --yes --package=broken-link-checker -- 'blc -ro --exclude=localhost:8080 --exclude=codepen.io --exclude=linkedin.com --exclude=docs.github.com --exclude=twitter.com https://sass-lang.com'"
|
"checklinks:external": "npx --yes --package=broken-link-checker -- 'blc -ro --exclude=localhost:8080 --exclude=codepen.io --exclude=linkedin.com --exclude=docs.github.com --exclude=twitter.com https://sass-lang.com'"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -797,6 +797,7 @@
|
|||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
ul.tsd-parameter-list > li.tsd-parameter-signature,
|
ul.tsd-parameter-list > li.tsd-parameter-signature,
|
||||||
|
ul.tsd-parameters > li.tsd-parameter-signature,
|
||||||
ul.tsd-type-parameter-list > li.tsd-parameter-signature {
|
ul.tsd-type-parameter-list > li.tsd-parameter-signature {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin-left: -20px;
|
margin-left: -20px;
|
||||||
|
@ -7,8 +7,9 @@ date: 2014-03-07 16:40:00 -8
|
|||||||
After ironing out a bunch of bugs in numerous release candidates, we're finally
|
After ironing out a bunch of bugs in numerous release candidates, we're finally
|
||||||
ready to release Sass 3.3.0, codename Maptastic Maple, for public consumption.
|
ready to release Sass 3.3.0, codename Maptastic Maple, for public consumption.
|
||||||
This release has a lot of exciting new features that you can read about in full
|
This release has a lot of exciting new features that you can read about in full
|
||||||
in [the changelog](/documentation/file.SASS_CHANGELOG.html), but there are three
|
in [the
|
||||||
that I want to draw your attention to in particular.
|
changelog](https://github.com/sass/ruby-sass/blob/stable/doc-src/SASS_CHANGELOG.md),
|
||||||
|
but there are three that I want to draw your attention to in particular.
|
||||||
|
|
||||||
## Maps in SassScript
|
## Maps in SassScript
|
||||||
|
|
||||||
@ -40,9 +41,8 @@ previously referred to an empty list, now _also_ refers to an empty map; both
|
|||||||
list and map operations will work on it.
|
list and map operations will work on it.
|
||||||
|
|
||||||
Maps can't be used as CSS values, since they aren't valid CSS syntax. However,
|
Maps can't be used as CSS values, since they aren't valid CSS syntax. However,
|
||||||
there are a number of [new built-in
|
there are a number of [new built-in functions](/documentation/modules/map/) that
|
||||||
functions](/documentation/Sass/Script/Functions.html#map_functions) that allow
|
allow user-defined mixins and functions to use them. Here are a few particularly
|
||||||
user-defined mixins and functions to use them. Here are a few particularly
|
|
||||||
useful ones:
|
useful ones:
|
||||||
|
|
||||||
* `map-get($map, $key)` looks up a value in a map using its key. For example,
|
* `map-get($map, $key)` looks up a value in a map using its key. For example,
|
||||||
@ -150,9 +150,10 @@ release it will work as I described above.
|
|||||||
|
|
||||||
Actually, there's a lot more, but that's all I have room for in this post. If
|
Actually, there's a lot more, but that's all I have room for in this post. If
|
||||||
you want to see the full assortment of new features, check out [the
|
you want to see the full assortment of new features, check out [the
|
||||||
changelog](/documentation/file.SASS_CHANGELOG.html#330_7_March_2014). You can
|
changelog](https://github.com/sass/ruby-sass/blob/stable/doc-src/SASS_CHANGELOG.md#330-7-march-2014).
|
||||||
also play with the new features on [SassMeister](http://sassmeister.com/) or on
|
You can also play with the new features on
|
||||||
your own computer by running `gem update sass`. Enjoy!
|
[SassMeister](http://sassmeister.com/) or on your own computer by running `gem
|
||||||
|
update sass`. Enjoy!
|
||||||
|
|
||||||
[^1]: Some languages call them "hashes", "dictionaries", or "associative
|
[^1]: Some languages call them "hashes", "dictionaries", or "associative
|
||||||
arrays". JavaScript calls them "objects" for weird historical reasons.
|
arrays". JavaScript calls them "objects" for weird historical reasons.
|
||||||
|
@ -10,8 +10,8 @@ succeeded. A mere five months after the release of [Sass
|
|||||||
codename Selective Steve. Faster releases mean fewer major features per release,
|
codename Selective Steve. Faster releases mean fewer major features per release,
|
||||||
so there are only two big new things to talk about (although there are plenty of
|
so there are only two big new things to talk about (although there are plenty of
|
||||||
little improvements you can read about in [the
|
little improvements you can read about in [the
|
||||||
changelog](/documentation/file.SASS_CHANGELOG.html)). As the version name
|
changelog](https://github.com/sass/ruby-sass/blob/stable/doc-src/SASS_CHANGELOG.md)).
|
||||||
suggests, both of these features have to do with selectors.
|
As the version name suggests, both of these features have to do with selectors.
|
||||||
|
|
||||||
## Using `&` in SassScript
|
## Using `&` in SassScript
|
||||||
|
|
||||||
@ -53,11 +53,11 @@ uses,but they're very liberal in what they accept: anything from nested lists to
|
|||||||
plain old strings.
|
plain old strings.
|
||||||
|
|
||||||
If you want to see every selector function we thought up, check out [the
|
If you want to see every selector function we thought up, check out [the
|
||||||
changelog](/documentation/file.SASS_CHANGELOG.html). I do want to highlight a
|
changelog](https://github.com/sass/ruby-sass/blob/stable/doc-src/SASS_CHANGELOG.md).
|
||||||
few that I'm particularly fond of, though. You've already seen
|
I do want to highlight a few that I'm particularly fond of, though. You've
|
||||||
`selector-nest()`, and **`selector-append()`** is a close relative. The
|
already seen `selector-nest()`, and **`selector-append()`** is a close relative.
|
||||||
difference between them is whitespace: `selector-nest()` adds a space between
|
The difference between them is whitespace: `selector-nest()` adds a space
|
||||||
its selectors, where `selector-append()` doesn't. This means that
|
between its selectors, where `selector-append()` doesn't. This means that
|
||||||
`selector-append(".foo, .bar", "-suffix")` returns `.foo-suffix, .bar-suffix`.
|
`selector-append(".foo, .bar", "-suffix")` returns `.foo-suffix, .bar-suffix`.
|
||||||
|
|
||||||
Another function I like a lot is **`selector-replace()`**. This does a
|
Another function I like a lot is **`selector-replace()`**. This does a
|
||||||
|
@ -111,7 +111,7 @@ these brackets as well. Here's what they look like in CSS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
The solution was clear: Sass already has a [list data
|
The solution was clear: Sass already has a [list data
|
||||||
type](/documentation/file.SASS_REFERENCE.html#lists), so we'd just allow lists
|
type](/documentation/values/lists/), so we'd just allow lists
|
||||||
to have square brackets. So `[first]` is just a list containing the unquoted
|
to have square brackets. So `[first]` is just a list containing the unquoted
|
||||||
string `first`. Like all Sass lists, bracketed lists can either be
|
string `first`. Like all Sass lists, bracketed lists can either be
|
||||||
space-separated or comma-separated: `[foo bar baz]` and `[foo, bar, baz]` are
|
space-separated or comma-separated: `[foo bar baz]` and `[foo, bar, baz]` are
|
||||||
|
@ -64,8 +64,7 @@ Sass:
|
|||||||
|
|
||||||
* Color arithmetic is deprecated. Channel-by-channel arithmetic doesn't
|
* Color arithmetic is deprecated. Channel-by-channel arithmetic doesn't
|
||||||
correspond closely to intuitive understandings of color. Sass's suite of
|
correspond closely to intuitive understandings of color. Sass's suite of
|
||||||
[color
|
[color functions](/documentation/modules/color/)
|
||||||
functions](/documentation/Sass/Script/Functions.html#other_color_functions)
|
|
||||||
are a much cleaner and more comprehensible way of manipulating colors
|
are a much cleaner and more comprehensible way of manipulating colors
|
||||||
dynamically.
|
dynamically.
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ feature specifications that have historically just been scattered around issue
|
|||||||
comments.
|
comments.
|
||||||
|
|
||||||
Leading up to the end of life, we'll be migrating the user-focused [reference
|
Leading up to the end of life, we'll be migrating the user-focused [reference
|
||||||
documentation](/documentation/file.SASS_REFERENCE.html) from the Ruby Sass
|
documentation](/documentation/) from the Ruby Sass
|
||||||
repository to the Sass website. We could use some help doing the migration and
|
repository to the Sass website. We could use some help doing the migration and
|
||||||
touching up the documentation, so if you're interested please [chime in on the
|
touching up the documentation, so if you're interested please [chime in on the
|
||||||
tracking issue](https://github.com/sass/sass-site/issues/205)!
|
tracking issue](https://github.com/sass/sass-site/issues/205)!
|
||||||
|
@ -14,7 +14,7 @@ and we intend to continue that pattern moving forward!
|
|||||||
### `@content` Arguments
|
### `@content` Arguments
|
||||||
|
|
||||||
Mixins that take [`@content`
|
Mixins that take [`@content`
|
||||||
blocks](/documentation/file.SASS_REFERENCE.html#mixin-content) can now pass
|
blocks](/documentation/at-rules/mixin/#content-blocks) can now pass
|
||||||
arguments to those blocks. This is written `@content(<arguments...>)`. If a
|
arguments to those blocks. This is written `@content(<arguments...>)`. If a
|
||||||
mixin passes arguments to its content block, users of that mixin must accept
|
mixin passes arguments to its content block, users of that mixin must accept
|
||||||
those arguments by writing `@include <name> using (<arguments...>)`. The
|
those arguments by writing `@include <name> using (<arguments...>)`. The
|
||||||
@ -78,7 +78,7 @@ blue channel or lightness (respectively) and the second as the alpha channel.
|
|||||||
|
|
||||||
**Be aware though** that the normal rules for [disambiguating between division
|
**Be aware though** that the normal rules for [disambiguating between division
|
||||||
and `/` as a
|
and `/` as a
|
||||||
separator](/documentation/file.SASS_REFERENCE.html#division-and-slash) still
|
separator](/documentation/breaking-changes/slash-div/) still
|
||||||
apply! So if you want to pass a variable for the alpha value, you'll need to use
|
apply! So if you want to pass a variable for the alpha value, you'll need to use
|
||||||
the old `rgba()` syntax. We're [considering possible long-term
|
the old `rgba()` syntax. We're [considering possible long-term
|
||||||
solutions](https://github.com/sass/sass/issues/2565) for this problem as `/` is
|
solutions](https://github.com/sass/sass/issues/2565) for this problem as `/` is
|
||||||
|
@ -11,7 +11,7 @@ Sass file in another, which makes it hard to keep track of where mixins,
|
|||||||
functions, and variables were defined and hard to be sure that any new additions
|
functions, and variables were defined and hard to be sure that any new additions
|
||||||
won't happen to conflict with something elsewhere in the project. To make
|
won't happen to conflict with something elsewhere in the project. To make
|
||||||
matters worse, it overlaps with CSS's built-in `@import` rule, which forces us
|
matters worse, it overlaps with CSS's built-in `@import` rule, which forces us
|
||||||
to have [a bunch of heuristics](/documentation/file.SASS_REFERENCE.html#import)
|
to have [a bunch of heuristics](/documentation/at-rules/import/)
|
||||||
to decide which is which.
|
to decide which is which.
|
||||||
|
|
||||||
Because of these problems and others, we've wanted to do a full overhaul of the
|
Because of these problems and others, we've wanted to do a full overhaul of the
|
||||||
|
@ -250,7 +250,7 @@ the problems that would arise if new members could be loaded dynamically.
|
|||||||
|
|
||||||
The Sass ecosystem won't switch to `@use` overnight, so in the meantime it needs
|
The Sass ecosystem won't switch to `@use` overnight, so in the meantime it needs
|
||||||
to [interoperate well with
|
to [interoperate well with
|
||||||
`@import`](/documentation/at-rules/import#import-and-modules).
|
`@import`](/documentation/at-rules/import/#import-and-modules).
|
||||||
This is supported in both directions:
|
This is supported in both directions:
|
||||||
|
|
||||||
* When a file that contains `@import`s is `@use`d, everything in its global
|
* When a file that contains `@import`s is `@use`d, everything in its global
|
||||||
@ -272,25 +272,26 @@ files that are only visible to `@import`, not to `@use`. They're written
|
|||||||
Concurrent with the launch of the new module system, we're launching a new
|
Concurrent with the launch of the new module system, we're launching a new
|
||||||
[automated Sass migrator](/documentation/cli/migrator). This tool makes it easy
|
[automated Sass migrator](/documentation/cli/migrator). This tool makes it easy
|
||||||
to migrate most stylesheets to use the new module system automatically. Follow
|
to migrate most stylesheets to use the new module system automatically. Follow
|
||||||
the instructions on [the Sass website](/documentation/cli/migrator#installation)
|
the instructions on [the Sass
|
||||||
to install it, then run it on your application:
|
website](/documentation/cli/migrator/#installation) to install it, then run it
|
||||||
|
on your application:
|
||||||
|
|
||||||
```shellsession
|
```shellsession
|
||||||
$ sass-migrator module --migrate-deps <path/to/style.scss>
|
$ sass-migrator module --migrate-deps <path/to/style.scss>
|
||||||
```
|
```
|
||||||
|
|
||||||
The [`--migrate-deps` flag](/documentation/cli/migrator#migrate-deps) tells the
|
The [`--migrate-deps` flag](/documentation/cli/migrator/#migrate-deps) tells the
|
||||||
migrator to migrate not only the file you pass, but anything it imports as well.
|
migrator to migrate not only the file you pass, but anything it imports as well.
|
||||||
The migrator will automatically pick up files imported through [Webpack's
|
The migrator will automatically pick up files imported through [Webpack's
|
||||||
`node_modules`
|
`node_modules`
|
||||||
syntax](https://github.com/webpack-contrib/sass-loader#resolving-import-at-rules),
|
syntax](https://github.com/webpack-contrib/sass-loader#resolving-import-at-rules),
|
||||||
but you can also pass explicit load paths with the [`--load-path`
|
but you can also pass explicit load paths with the [`--load-path`
|
||||||
flag](/documentation/cli/migrator#load-path).
|
flag](/documentation/cli/migrator/#load-path).
|
||||||
|
|
||||||
If you want the migrator to tell you what changes it would make without actually
|
If you want the migrator to tell you what changes it would make without actually
|
||||||
making them, pass both the [`--dry-run`
|
making them, pass both the [`--dry-run`
|
||||||
flag](/documentation/cli/migrator#dry-run) and the [`--verbose`
|
flag](/documentation/cli/migrator/#dry-run) and the [`--verbose`
|
||||||
flag](/documentation/cli/migrator#verbose) to tell it to just print out the
|
flag](/documentation/cli/migrator/#verbose) to tell it to just print out the
|
||||||
changes it would make without saving them to disk.
|
changes it would make without saving them to disk.
|
||||||
|
|
||||||
### Migrating a Library
|
### Migrating a Library
|
||||||
@ -302,14 +303,14 @@ and use, run:
|
|||||||
$ sass-migrator module --migrate-deps --forward=all <path/to/index.scss>
|
$ sass-migrator module --migrate-deps --forward=all <path/to/index.scss>
|
||||||
```
|
```
|
||||||
|
|
||||||
The [`--forward` flag](/documentation/cli/migrator#forward) tells the migrator
|
The [`--forward` flag](/documentation/cli/migrator/#forward) tells the migrator
|
||||||
to add [`@forward` rules](/documentation/at-rules/forward) so that users can
|
to add [`@forward` rules](/documentation/at-rules/forward) so that users can
|
||||||
still load all the mixins, variables, and functions your library defines with a
|
still load all the mixins, variables, and functions your library defines with a
|
||||||
single `@use`.
|
single `@use`.
|
||||||
|
|
||||||
If you added a manual namespace to your library to avoid name conflicts, the
|
If you added a manual namespace to your library to avoid name conflicts, the
|
||||||
migrator will remove it for you if you pass the [`--remove-prefix`
|
migrator will remove it for you if you pass the [`--remove-prefix`
|
||||||
flag](/documentation/cli/migrator#remove-prefix). You can even choose to only
|
flag](/documentation/cli/migrator/#remove-prefix). You can even choose to only
|
||||||
forward members that originally had that prefix by passing `--forward=prefixed`.
|
forward members that originally had that prefix by passing `--forward=prefixed`.
|
||||||
|
|
||||||
### Filing Issues
|
### Filing Issues
|
||||||
|
Loading…
Reference in New Issue
Block a user