Skip to content

Commit a20dc83

Browse files
authored
Remove now unnecessary files after migration away from Jekyll (#214)
1 parent bb2e20b commit a20dc83

33 files changed

+28
-3430
lines changed

doc/code-excerpts.md

-10
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,6 @@ For more information about the `replace` argument syntax see
158158

159159
# Advanced features
160160

161-
## Embellished code excerpts
162-
163-
In some repos, code excerpts not only serve to associate a code block with its
164-
originating source, but the processing instruction guides Jekyll plugins at site
165-
compile time. The rendered code is displayed in an embellished bordered box with
166-
an (optional) header (usually containing the originating file name and code
167-
region name), as well as an interactive copy-code button.
168-
169-
Nothing extra needs to be added to the processing instructions (other than selected arguments like `title`, when desired). Generation of the adorning HTML is handled by Jekyll plugins like [markdown_with_code_excerpts.rb][].
170-
171161
## Code diffs
172162

173163
To make use of code diffs in a given page, add the following to the page's front matter (or archive the equivalent setting using `_config.yml` file defaults):

doc/images.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Compressing
22

33
Compress/optimize all images uploaded to the site
4-
to reduce site load time as well as Jekyll build time.
4+
to reduce site load time as well as site build time.
55

66
[TODO: Include tool in site infrastructure for optimizing images]
77

doc/infrastructure.md

-41
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,4 @@ To use a specific `site-shared` resource, you'll generally create a symlink to
1414
the desired resource file. In some cases, you'll need to adjust the site
1515
`_config.yml`. Details are given below.
1616

17-
## Jekyll
18-
19-
We use the [Jekyll][] site generator, leaving most of its configuration options
20-
at their [default settings][Default configuration],
21-
including use of Kramdown as the Markdown processor
22-
and [Rouge][] as the default syntax highlighter.
23-
24-
To see a list of the languages you can use with <code>```</code>, see
25-
Rouge's [list of supported languages and lexer][languages].
26-
The most common languages we use are `dart`, <code>console</code> (or its equivalent,
27-
<code>terminal</code>), <code>nocode</code>, and <code>yaml</code>.
28-
29-
## Ruby gems and the bundler
30-
31-
Jekyll is written in Ruby, so we use the [bundler][] (the equivalent of Dart's
32-
pub) to manage gems (the equivalent of pub packages). Each site's `Gemfile`
33-
specifies the gems it uses, possibly constraining gem versions (similar to what
34-
you'd do using a `pubspec.yaml` file). The bundler creates a `Gemfile.lock`
35-
which (transitively) lists the gems and gem versions actually used for the site.
36-
37-
For optimal sharing of resources across sites, ensure that the sites' `Gemfile`s
38-
are kept as in sync to the extent practical / possible.
39-
40-
## Jekyll plugins
41-
42-
The main third-party Jekyll plugins we use are the following:
43-
44-
- [jekyll-toc][] for auto-generation of page table of contents.
45-
46-
We share custom plugins across sites. These can be found under [src/_plugins][].
47-
To use a shared plugin, create a symlink from the plugin in
48-
`site-shared/src/_plugins` to the repo's `src/_plugins` folder.
49-
50-
[bundler]: https://bundler.io
51-
[Default configuration]: https://jekyllrb.com/docs/configuration/default/
5217
[git submodule]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
53-
[Jekyll]: https://jekyllrb.com
54-
[jekyll-toc]: https://github.com/toshimaru/jekyll-toc
55-
[languages]: https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers
56-
[Rouge]: https://github.com/rouge-ruby/rouge
57-
[src/_assets]: https://github.com/dart-lang/site-shared/tree/main/src/_assets
58-
[src/_plugins]: https://github.com/dart-lang/site-shared/tree/main/src/_plugins

doc/markdown.md

+6-32
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,13 @@ meaning you can write using [GitHub Flavored Markdown][].
66

77
## Code blocks
88

9-
There are two ways to document code blocks on our sites:
9+
Use standard markdown syntax for fenced code blocks.
1010

11-
1. Use standard markdown syntax for fenced code like this:
12-
13-
````markdown
14-
```dart
15-
class C { ... }
16-
```
17-
````
18-
19-
1. Use the [prettify][] Jekyll block tag, supported via a custom plugin
20-
designed for use on our sites.
21-
Only use if you need code highlighting and the snippet
22-
is not a code-excerpt.
23-
24-
```markdown
25-
{% prettify dart %}
26-
void main() { ... }
27-
{% endprettify %}
28-
```
29-
30-
### **PREFER** using ``` fenced markdown for **code blocks**
31-
32-
Standard markdown syntax is recognized by many IDEs as well as online editors
33-
and viewers like those available on GitHub. These tools offer convenient syntax
34-
highlighting and more. Markdown syntax can be used in site pages as well as API
35-
documentation.
36-
37-
For these reasons, prefer standard markdown code-block syntax over use of the
38-
Jekyll prettify block tag.
39-
40-
Use the `prettify` block tag if you need support for code highlighting, and your
41-
site isn't using the [markdown_with_code_excerpts.rb][] plugin.
11+
````markdown
12+
```dart
13+
class C { ... }
14+
```
15+
````
4216

4317
## **AVOID** using HTML when markdown syntax will do
4418

doc/writing-for-dart-and-flutter-websites.md

+12-20
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ as you develop content for Dart and Flutter websites.
44
Contents of this page:
55
* [Semantic line breaks (<=80 chars)](#semantic-line-breaks)
66
* [URLs](#urls)
7-
* [Images](#images)
87
* [Code](#code)
98
* [Markdown and HTML](#markdown-and-html)
109
* [Top matter (YAML)](#top-matter-yaml)
@@ -76,10 +75,10 @@ Follow these rules when creating links:
7675

7776
* If you're editing an `index.html` or `index.md` page,
7877
don't use relative links. Instead, use links that **start** with `/`.
79-
Otherwise (because we omit trailing `/`s) links go one directory too high.
78+
Otherwise, (because we omit trailing `/`s) links go one directory too high.
8079
For example, a `/tools` page should link to `/tools/sdk`, not to `sdk`.
8180

82-
* Use jekyll variables if they exist; define new ones if necessary.
81+
* Use liquid variables if they exist; define new ones if necessary.
8382
You can find sitewide variables in `/_config.yml`.
8483
For example, the [site-www `_config.yml` file][] defines variables like
8584
`dartpad`, `flutter`, and `dart_api`, so site-www has URLs like
@@ -167,8 +166,8 @@ also keep in mind [Whitespace control][]
167166
to allow for proper formatting of the generate HTML.
168167

169168
[liquid]: https://shopify.github.io/liquid/
170-
[includes]: https://jekyllrb.com/docs/liquid/tags/#includes
171-
[filters]: https://jekyllrb.com/docs/liquid/filters
169+
[includes]: https://liquidjs.com/tags/include.html
170+
[filters]: https://www.11ty.dev/docs/languages/liquid/#filters
172171
[raw]: https://shopify.github.io/liquid/tags/template/#raw
173172
[Whitespace control]: https://shopify.github.io/liquid/basics/whitespace/
174173

@@ -234,21 +233,14 @@ and **category**.
234233
## Asides
235234

236235
To add notes, tips, warnings, and other asides
237-
use the following custom-defined Liquid tags:
236+
use the following custom Markdown syntax.
238237

239238
```
240-
{{site.alert.tip}}
241-
Tip text goes here.
242-
{{site.alert.end}}
243-
...
244-
{{site.alert.important}}
245-
Important text goes here.
246-
{{site.alert.end}}
247-
```
248-
249-
All text within an aside should be consistently indented 2 spaces.
239+
:::tip
240+
Tip text goes here.
241+
:::
250242
251-
You can see the full list of aside/alert types
252-
in your site repo's `_config.yml` file.
253-
For example, search for `alert:` in
254-
[Flutter's `_config.yml` file](https://github.com/flutter/website/blob/main/_config.yml).
243+
:::important
244+
Important text goes here.
245+
:::
246+
```

packages/code_excerpt_updater/test_data/src/no_change/diff.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## Diff tests of code blocks in Jekyll `diff` tags
1+
## Diff tests of code blocks in Markdown `diff` tags
22

33
## Basic
44

55
<?code-excerpt "0-base/basic.dart" diff-with="1-step/basic.dart"?>
6-
{% diff %}
6+
```diff
77
--- 0-base/basic.dart
88
+++ 1-step/basic.dart
99
@@ -1,4 +1,4 @@
@@ -12,12 +12,12 @@
1212
var _scope = 'world';
1313

1414
void main() => print('$_greeting $_scope');
15-
{% enddiff %}
15+
```
1616

1717
### Files with docregion tags
1818

1919
<?code-excerpt "0-base/docregion.dart" diff-with="1-step/docregion.dart"?>
20-
{% diff %}
20+
```diff
2121
--- 0-base/docregion.dart
2222
+++ 1-step/docregion.dart
2323
@@ -1,4 +1,4 @@
@@ -32,23 +32,23 @@
3232
/// hunks
3333
-void main() => print('$_greeting $_scope');
3434
+void main() => print('$_greeting $_scope!');
35-
{% enddiff %}
35+
```
3636

3737
### Diff region
3838

3939
<?code-excerpt "0-base/docregion.dart (main)" diff-with="1-step/docregion.dart"?>
40-
{% diff %}
40+
```diff
4141
--- 0-base/docregion.dart (main)
4242
+++ 1-step/docregion.dart (main)
4343
@@ -1 +1 @@
4444
-void main() => print('$_greeting $_scope');
4545
+void main() => print('$_greeting $_scope!');
46-
{% enddiff %}
46+
```
4747

4848
### Files with docregion tags and diff-u argument
4949

5050
<?code-excerpt "0-base/docregion.dart" diff-with="1-step/docregion.dart" diff-u="4"?>
51-
{% diff %}
51+
```diff
5252
--- 0-base/docregion.dart
5353
+++ 1-step/docregion.dart
5454
@@ -1,5 +1,5 @@
@@ -65,7 +65,7 @@
6565
/// hunks
6666
-void main() => print('$_greeting $_scope');
6767
+void main() => print('$_greeting $_scope!');
68-
{% enddiff %}
68+
```
6969

7070
## Bash path-brace syntax for diffs
7171

src/_assets/vendor/code-prettify/_prettify.scss

-1
This file was deleted.

0 commit comments

Comments
 (0)