From 5690ce390bcc21f065bd80de8c1d03730b6811f7 Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Tue, 20 Jun 2023 11:20:07 -0400 Subject: [PATCH] Check blog internal links too --- .github/dependabot.yml | 10 ++++++++++ eleventy.config.js | 5 ++++- package.json | 4 ++-- source/assets/sass/vendor/typedoc/_style.scss | 1 + source/blog/003-sass-33-is-released.md | 17 +++++++++-------- source/blog/004-sass-34-is-released.md | 14 +++++++------- source/blog/008-sass-35-release-candidate.md | 2 +- source/blog/013-sass-35-is-released.md | 3 +-- source/blog/015-ruby-sass-is-deprecated.md | 2 +- ...chcontent-arguments-and-color-functions.md | 4 ++-- ...est-for-comments-module-system-proposal.md | 2 +- .../blog/024-the-module-system-is-launched.md | 19 ++++++++++--------- 12 files changed, 49 insertions(+), 34 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0955e54..f2aff27 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,3 +8,13 @@ updates: directory: '/' schedule: 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'] diff --git a/eleventy.config.js b/eleventy.config.js index 7ad1cdd..3a8314c 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -35,7 +35,10 @@ module.exports = eleventyConfig => { eleventyConfig.setLibrary('liquid', liquidEngine); eleventyConfig.setLibrary('md', markdownEngine); 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 eleventyConfig.addPlugin(componentsPlugin); diff --git a/package.json b/package.json index 6d0b6dc..3969e01 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ "scripts": { "serve": "run-p 'watch:**'", "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", - "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", "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", @@ -36,7 +36,7 @@ "lint": "run-s prettier gts stylelint tsc", "lint:ci": "run-s prettier:ci gts:ci stylelint:ci tsc", "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'" }, "devDependencies": { diff --git a/source/assets/sass/vendor/typedoc/_style.scss b/source/assets/sass/vendor/typedoc/_style.scss index bf3802b..0fb9f92 100644 --- a/source/assets/sass/vendor/typedoc/_style.scss +++ b/source/assets/sass/vendor/typedoc/_style.scss @@ -797,6 +797,7 @@ padding-left: 20px; } ul.tsd-parameter-list > li.tsd-parameter-signature, + ul.tsd-parameters > li.tsd-parameter-signature, ul.tsd-type-parameter-list > li.tsd-parameter-signature { list-style: none; margin-left: -20px; diff --git a/source/blog/003-sass-33-is-released.md b/source/blog/003-sass-33-is-released.md index a72ecc6..81125ef 100644 --- a/source/blog/003-sass-33-is-released.md +++ b/source/blog/003-sass-33-is-released.md @@ -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 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 -in [the changelog](/documentation/file.SASS_CHANGELOG.html), but there are three -that I want to draw your attention to in particular. +in [the +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 @@ -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. Maps can't be used as CSS values, since they aren't valid CSS syntax. However, -there are a number of [new built-in -functions](/documentation/Sass/Script/Functions.html#map_functions) that allow -user-defined mixins and functions to use them. Here are a few particularly +there are a number of [new built-in functions](/documentation/modules/map/) that +allow user-defined mixins and functions to use them. Here are a few particularly useful ones: * `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 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 -also play with the new features on [SassMeister](http://sassmeister.com/) or on -your own computer by running `gem update sass`. Enjoy! +changelog](https://github.com/sass/ruby-sass/blob/stable/doc-src/SASS_CHANGELOG.md#330-7-march-2014). +You can also play with the new features on +[SassMeister](http://sassmeister.com/) or on your own computer by running `gem +update sass`. Enjoy! [^1]: Some languages call them "hashes", "dictionaries", or "associative arrays". JavaScript calls them "objects" for weird historical reasons. diff --git a/source/blog/004-sass-34-is-released.md b/source/blog/004-sass-34-is-released.md index 680d1ad..ff2165d 100644 --- a/source/blog/004-sass-34-is-released.md +++ b/source/blog/004-sass-34-is-released.md @@ -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, so there are only two big new things to talk about (although there are plenty of little improvements you can read about in [the -changelog](/documentation/file.SASS_CHANGELOG.html)). As the version name -suggests, both of these features have to do with selectors. +changelog](https://github.com/sass/ruby-sass/blob/stable/doc-src/SASS_CHANGELOG.md)). +As the version name suggests, both of these features have to do with selectors. ## 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. 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 -few that I'm particularly fond of, though. You've already seen -`selector-nest()`, and **`selector-append()`** is a close relative. The -difference between them is whitespace: `selector-nest()` adds a space between -its selectors, where `selector-append()` doesn't. This means that +changelog](https://github.com/sass/ruby-sass/blob/stable/doc-src/SASS_CHANGELOG.md). +I do want to highlight a few that I'm particularly fond of, though. You've +already seen `selector-nest()`, and **`selector-append()`** is a close relative. +The difference between them is whitespace: `selector-nest()` adds a space +between its selectors, where `selector-append()` doesn't. This means that `selector-append(".foo, .bar", "-suffix")` returns `.foo-suffix, .bar-suffix`. Another function I like a lot is **`selector-replace()`**. This does a diff --git a/source/blog/008-sass-35-release-candidate.md b/source/blog/008-sass-35-release-candidate.md index 533758d..d23c552 100644 --- a/source/blog/008-sass-35-release-candidate.md +++ b/source/blog/008-sass-35-release-candidate.md @@ -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 -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 string `first`. Like all Sass lists, bracketed lists can either be space-separated or comma-separated: `[foo bar baz]` and `[foo, bar, baz]` are diff --git a/source/blog/013-sass-35-is-released.md b/source/blog/013-sass-35-is-released.md index ea7cfbb..4b66e3b 100644 --- a/source/blog/013-sass-35-is-released.md +++ b/source/blog/013-sass-35-is-released.md @@ -64,8 +64,7 @@ Sass: * Color arithmetic is deprecated. Channel-by-channel arithmetic doesn't correspond closely to intuitive understandings of color. Sass's suite of - [color - functions](/documentation/Sass/Script/Functions.html#other_color_functions) + [color functions](/documentation/modules/color/) are a much cleaner and more comprehensible way of manipulating colors dynamically. diff --git a/source/blog/015-ruby-sass-is-deprecated.md b/source/blog/015-ruby-sass-is-deprecated.md index c292e80..2961669 100644 --- a/source/blog/015-ruby-sass-is-deprecated.md +++ b/source/blog/015-ruby-sass-is-deprecated.md @@ -78,7 +78,7 @@ feature specifications that have historically just been scattered around issue comments. 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 touching up the documentation, so if you're interested please [chime in on the tracking issue](https://github.com/sass/sass-site/issues/205)! diff --git a/source/blog/018-feature-watchcontent-arguments-and-color-functions.md b/source/blog/018-feature-watchcontent-arguments-and-color-functions.md index ce0f59b..ee86e57 100644 --- a/source/blog/018-feature-watchcontent-arguments-and-color-functions.md +++ b/source/blog/018-feature-watchcontent-arguments-and-color-functions.md @@ -14,7 +14,7 @@ and we intend to continue that pattern moving forward! ### `@content` Arguments 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()`. If a mixin passes arguments to its content block, users of that mixin must accept those arguments by writing `@include using ()`. 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 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 the old `rgba()` syntax. We're [considering possible long-term solutions](https://github.com/sass/sass/issues/2565) for this problem as `/` is diff --git a/source/blog/019-request-for-comments-module-system-proposal.md b/source/blog/019-request-for-comments-module-system-proposal.md index b765906..52d1728 100644 --- a/source/blog/019-request-for-comments-module-system-proposal.md +++ b/source/blog/019-request-for-comments-module-system-proposal.md @@ -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 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 -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. Because of these problems and others, we've wanted to do a full overhaul of the diff --git a/source/blog/024-the-module-system-is-launched.md b/source/blog/024-the-module-system-is-launched.md index d116115..b883aba 100644 --- a/source/blog/024-the-module-system-is-launched.md +++ b/source/blog/024-the-module-system-is-launched.md @@ -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 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: * 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 [automated Sass migrator](/documentation/cli/migrator). This tool makes it easy to migrate most stylesheets to use the new module system automatically. Follow -the instructions on [the Sass website](/documentation/cli/migrator#installation) -to install it, then run it on your application: +the instructions on [the Sass +website](/documentation/cli/migrator/#installation) to install it, then run it +on your application: ```shellsession $ sass-migrator module --migrate-deps ``` -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. The migrator will automatically pick up files imported through [Webpack's `node_modules` syntax](https://github.com/webpack-contrib/sass-loader#resolving-import-at-rules), 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 making them, pass both the [`--dry-run` -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/#dry-run) and the [`--verbose` +flag](/documentation/cli/migrator/#verbose) to tell it to just print out the changes it would make without saving them to disk. ### Migrating a Library @@ -302,14 +303,14 @@ and use, run: $ sass-migrator module --migrate-deps --forward=all ``` -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 still load all the mixins, variables, and functions your library defines with a single `@use`. 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` -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`. ### Filing Issues