Skip to content

Commit 1c5b401

Browse files
committed
site variables
1 parent becef0e commit 1c5b401

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/content/language/macros.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Why we're adding macros to Dart, motivating use cases,
2424
benefits over existing code gen solutions,
2525
and a cursory overview of how writing macros works.
2626

27-
[spec]: https://github.com/dart-lang/language/blob/main/working/macros/feature-specification.md
28-
[motivation]: https://github.com/dart-lang/language/blob/main/working/macros/motivation.md
27+
[spec]: {{site.repo.dart.lang}}/blob/main/working/macros/feature-specification.md
28+
[motivation]: {{site.repo.dart.lang}}/language/blob/main/working/macros/motivation.md
2929

3030
## The `JsonCodable` macro
3131

@@ -40,7 +40,7 @@ It generates two members, a `toJson` serialization method,
4040
and a `fromJson` deserialization constructor.
4141

4242
[experiment flag]: /tools/experiment-flags
43-
[`JsonCodable`]: https://github.com/dart-lang/sdk/tree/main/pkg/json
43+
[`JsonCodable`]: {{site.repo.dart.sdk}}/tree/main/pkg/json
4444

4545
### Set up the experiment
4646

@@ -137,7 +137,7 @@ You can search "`DiagnosticMessage`" in the [the definition of `JsonCodable`][js
137137
for other errors the macro will throw. For example, extending a class that isn't
138138
also serializable, or if field names don't exactly match the key names in the given JSON.
139139

140-
[the definition of `JsonCodable`]: https://github.com/dart-lang/sdk/blob/master/pkg/json/lib/json.dart
140+
[the definition of `JsonCodable`]: {{site.repo.dart.sdk}}/blob/master/pkg/json/lib/json.dart
141141

142142
## The macros language feature
143143

@@ -197,8 +197,8 @@ Some common examples are:
197197
complex `build` method to generates smaller widget classes,
198198
greatly improving productivity and quality of Flutter code.
199199

200-
[json_serializable]: https://pub.dev/packages/json_serializable
201-
[most requested]: https://github.com/dart-lang/language/issues/314
200+
[json_serializable]: {{site.pub-pkg}}/json_serializable
201+
[most requested]: {{site.repo.dart.lang}}/issues/314
202202

203203
### How macros work
204204

@@ -252,10 +252,10 @@ the best guidance is to take a look at the implementation of exisiting macros:
252252
- Check out the [definition][json] of the `JsonCodable` macro,
253253
- Or any of the [examples][] available in the language repo.
254254

255-
[types]: https://github.com/dart-lang/sdk/blob/main/pkg/_macros/lib/src/api/macros.dart
256-
[json]: https://github.com/dart-lang/sdk/blob/master/pkg/json/lib/json.dart
257-
[augmentation]: https://github.com/dart-lang/language/blob/main/working/augmentation-libraries/feature-specification.md
258-
[examples]: https://github.com/dart-lang/language/tree/main/working/macros/example
255+
[types]: {{site.repo.dart.sdk}}/blob/main/pkg/_macros/lib/src/api/macros.dart
256+
[json]: {{site.repo.dart.sdk}}/blob/master/pkg/json/lib/json.dart
257+
[augmentation]: {{site.repo.dart.lang}}/blob/main/working/augmentation-libraries/feature-specification.md
258+
[examples]: {{site.repo.dart.lang}}/tree/main/working/macros/example
259259

260260
## Timeline
261261

@@ -276,6 +276,6 @@ We are working towards a stable release of the [`JsonCodable`][] macro
276276
later this year (2024), and a stable release of the full language feature
277277
(namely, writing your own macros) early next year (2025).
278278

279-
[introspection]: https://github.com/dart-lang/language/blob/main/working/macros/feature-specification.md#introspection
280-
[ordering]: https://github.com/dart-lang/language/blob/main/working/macros/feature-specification.md#ordering-in-metaprogramming
281-
[phases]: https://github.com/dart-lang/language/blob/main/working/macros/feature-specification.md#phases
279+
[introspection]: {{site.repo.dart.lang}}/blob/main/working/macros/feature-specification.md#introspection
280+
[ordering]: {{site.repo.dart.lang}}/blob/main/working/macros/feature-specification.md#ordering-in-metaprogramming
281+
[phases]: {{site.repo.dart.lang}}/blob/main/working/macros/feature-specification.md#phases

0 commit comments

Comments
 (0)