diff --git a/doc/code-excerpts.md b/doc/code-excerpts.md
index f753ad7..6971a61 100644
--- a/doc/code-excerpts.md
+++ b/doc/code-excerpts.md
@@ -158,16 +158,6 @@ For more information about the `replace` argument syntax see
# Advanced features
-## Embellished code excerpts
-
-In some repos, code excerpts not only serve to associate a code block with its
-originating source, but the processing instruction guides Jekyll plugins at site
-compile time. The rendered code is displayed in an embellished bordered box with
-an (optional) header (usually containing the originating file name and code
-region name), as well as an interactive copy-code button.
-
-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][].
-
## Code diffs
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):
diff --git a/doc/images.md b/doc/images.md
index d52a7e0..e2b901d 100644
--- a/doc/images.md
+++ b/doc/images.md
@@ -1,7 +1,7 @@
## Compressing
Compress/optimize all images uploaded to the site
-to reduce site load time as well as Jekyll build time.
+to reduce site load time as well as site build time.
[TODO: Include tool in site infrastructure for optimizing images]
diff --git a/doc/infrastructure.md b/doc/infrastructure.md
index 722190d..9380794 100644
--- a/doc/infrastructure.md
+++ b/doc/infrastructure.md
@@ -14,45 +14,4 @@ To use a specific `site-shared` resource, you'll generally create a symlink to
the desired resource file. In some cases, you'll need to adjust the site
`_config.yml`. Details are given below.
-## Jekyll
-
-We use the [Jekyll][] site generator, leaving most of its configuration options
-at their [default settings][Default configuration],
-including use of Kramdown as the Markdown processor
-and [Rouge][] as the default syntax highlighter.
-
-To see a list of the languages you can use with ```
, see
-Rouge's [list of supported languages and lexer][languages].
-The most common languages we use are `dart`, console
(or its equivalent,
-terminal
), nocode
, and yaml
.
-
-## Ruby gems and the bundler
-
-Jekyll is written in Ruby, so we use the [bundler][] (the equivalent of Dart's
-pub) to manage gems (the equivalent of pub packages). Each site's `Gemfile`
-specifies the gems it uses, possibly constraining gem versions (similar to what
-you'd do using a `pubspec.yaml` file). The bundler creates a `Gemfile.lock`
-which (transitively) lists the gems and gem versions actually used for the site.
-
-For optimal sharing of resources across sites, ensure that the sites' `Gemfile`s
-are kept as in sync to the extent practical / possible.
-
-## Jekyll plugins
-
-The main third-party Jekyll plugins we use are the following:
-
-- [jekyll-toc][] for auto-generation of page table of contents.
-
-We share custom plugins across sites. These can be found under [src/_plugins][].
-To use a shared plugin, create a symlink from the plugin in
-`site-shared/src/_plugins` to the repo's `src/_plugins` folder.
-
-[bundler]: https://bundler.io
-[Default configuration]: https://jekyllrb.com/docs/configuration/default/
[git submodule]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
-[Jekyll]: https://jekyllrb.com
-[jekyll-toc]: https://github.com/toshimaru/jekyll-toc
-[languages]: https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers
-[Rouge]: https://github.com/rouge-ruby/rouge
-[src/_assets]: https://github.com/dart-lang/site-shared/tree/main/src/_assets
-[src/_plugins]: https://github.com/dart-lang/site-shared/tree/main/src/_plugins
diff --git a/doc/markdown.md b/doc/markdown.md
index 8f48aac..25cc52e 100644
--- a/doc/markdown.md
+++ b/doc/markdown.md
@@ -6,39 +6,13 @@ meaning you can write using [GitHub Flavored Markdown][].
## Code blocks
-There are two ways to document code blocks on our sites:
+Use standard markdown syntax for fenced code blocks.
- 1. Use standard markdown syntax for fenced code like this:
-
- ````markdown
- ```dart
- class C { ... }
- ```
- ````
-
- 1. Use the [prettify][] Jekyll block tag, supported via a custom plugin
- designed for use on our sites.
- Only use if you need code highlighting and the snippet
- is not a code-excerpt.
-
- ```markdown
- {% prettify dart %}
- void main() { ... }
- {% endprettify %}
- ```
-
-### **PREFER** using ``` fenced markdown for **code blocks**
-
-Standard markdown syntax is recognized by many IDEs as well as online editors
-and viewers like those available on GitHub. These tools offer convenient syntax
-highlighting and more. Markdown syntax can be used in site pages as well as API
-documentation.
-
-For these reasons, prefer standard markdown code-block syntax over use of the
-Jekyll prettify block tag.
-
-Use the `prettify` block tag if you need support for code highlighting, and your
-site isn't using the [markdown_with_code_excerpts.rb][] plugin.
+````markdown
+```dart
+class C { ... }
+```
+````
## **AVOID** using HTML when markdown syntax will do
diff --git a/doc/writing-for-dart-and-flutter-websites.md b/doc/writing-for-dart-and-flutter-websites.md
index d3d31c8..793f493 100644
--- a/doc/writing-for-dart-and-flutter-websites.md
+++ b/doc/writing-for-dart-and-flutter-websites.md
@@ -4,7 +4,6 @@ as you develop content for Dart and Flutter websites.
Contents of this page:
* [Semantic line breaks (<=80 chars)](#semantic-line-breaks)
* [URLs](#urls)
-* [Images](#images)
* [Code](#code)
* [Markdown and HTML](#markdown-and-html)
* [Top matter (YAML)](#top-matter-yaml)
@@ -76,10 +75,10 @@ Follow these rules when creating links:
* If you're editing an `index.html` or `index.md` page,
don't use relative links. Instead, use links that **start** with `/`.
- Otherwise (because we omit trailing `/`s) links go one directory too high.
+ Otherwise, (because we omit trailing `/`s) links go one directory too high.
For example, a `/tools` page should link to `/tools/sdk`, not to `sdk`.
-* Use jekyll variables if they exist; define new ones if necessary.
+* Use liquid variables if they exist; define new ones if necessary.
You can find sitewide variables in `/_config.yml`.
For example, the [site-www `_config.yml` file][] defines variables like
`dartpad`, `flutter`, and `dart_api`, so site-www has URLs like
@@ -167,8 +166,8 @@ also keep in mind [Whitespace control][]
to allow for proper formatting of the generate HTML.
[liquid]: https://shopify.github.io/liquid/
-[includes]: https://jekyllrb.com/docs/liquid/tags/#includes
-[filters]: https://jekyllrb.com/docs/liquid/filters
+[includes]: https://liquidjs.com/tags/include.html
+[filters]: https://www.11ty.dev/docs/languages/liquid/#filters
[raw]: https://shopify.github.io/liquid/tags/template/#raw
[Whitespace control]: https://shopify.github.io/liquid/basics/whitespace/
@@ -234,21 +233,14 @@ and **category**.
## Asides
To add notes, tips, warnings, and other asides
-use the following custom-defined Liquid tags:
+use the following custom Markdown syntax.
```
-{{site.alert.tip}}
- Tip text goes here.
-{{site.alert.end}}
-...
-{{site.alert.important}}
- Important text goes here.
-{{site.alert.end}}
-```
-
-All text within an aside should be consistently indented 2 spaces.
+:::tip
+Tip text goes here.
+:::
-You can see the full list of aside/alert types
-in your site repo's `_config.yml` file.
-For example, search for `alert:` in
-[Flutter's `_config.yml` file](https://github.com/flutter/website/blob/main/_config.yml).
+:::important
+Important text goes here.
+:::
+```
diff --git a/packages/code_excerpt_updater/test_data/src/no_change/diff.md b/packages/code_excerpt_updater/test_data/src/no_change/diff.md
index fb95fe4..efc2424 100644
--- a/packages/code_excerpt_updater/test_data/src/no_change/diff.md
+++ b/packages/code_excerpt_updater/test_data/src/no_change/diff.md
@@ -1,9 +1,9 @@
-## Diff tests of code blocks in Jekyll `diff` tags
+## Diff tests of code blocks in Markdown `diff` tags
## Basic
-{% diff %}
+```diff
--- 0-base/basic.dart
+++ 1-step/basic.dart
@@ -1,4 +1,4 @@
@@ -12,12 +12,12 @@
var _scope = 'world';
void main() => print('$_greeting $_scope');
-{% enddiff %}
+```
### Files with docregion tags
-{% diff %}
+```diff
--- 0-base/docregion.dart
+++ 1-step/docregion.dart
@@ -1,4 +1,4 @@
@@ -32,23 +32,23 @@
/// hunks
-void main() => print('$_greeting $_scope');
+void main() => print('$_greeting $_scope!');
-{% enddiff %}
+```
### Diff region
-{% diff %}
+```diff
--- 0-base/docregion.dart (main)
+++ 1-step/docregion.dart (main)
@@ -1 +1 @@
-void main() => print('$_greeting $_scope');
+void main() => print('$_greeting $_scope!');
-{% enddiff %}
+```
### Files with docregion tags and diff-u argument
-{% diff %}
+```diff
--- 0-base/docregion.dart
+++ 1-step/docregion.dart
@@ -1,5 +1,5 @@
@@ -65,7 +65,7 @@
/// hunks
-void main() => print('$_greeting $_scope');
+void main() => print('$_greeting $_scope!');
-{% enddiff %}
+```
## Bash path-brace syntax for diffs
diff --git a/src/_assets/vendor/code-prettify/_prettify.scss b/src/_assets/vendor/code-prettify/_prettify.scss
deleted file mode 120000
index 205840f..0000000
--- a/src/_assets/vendor/code-prettify/_prettify.scss
+++ /dev/null
@@ -1 +0,0 @@
-prettify.css
\ No newline at end of file
diff --git a/src/_assets/vendor/code-prettify/lang-css.js b/src/_assets/vendor/code-prettify/lang-css.js
deleted file mode 100644
index 4107176..0000000
--- a/src/_assets/vendor/code-prettify/lang-css.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * @license
- * Copyright (C) 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @fileoverview
- * Registers a language handler for CSS.
- *
- *
- * To use, include prettify.js and this file in your HTML page.
- * Then put your code in an HTML tag like
- *
} and {@code } tags in your source with
- * {@code class=prettyprint.}
- * You can also use the (html deprecated) {@code } tag, but the pretty
- * printer needs to do more substantial DOM manipulations to support that, so
- * some css styles may not be preserved.
- *
- * That's it. I wanted to keep the API as simple as possible, so there's no
- * need to specify which language the code is in, but if you wish, you can add
- * another class to the {@code } or {@code } element to specify the
- * language, as in {@code }. Any class that
- * starts with "lang-" followed by a file extension, specifies the file type.
- * See the "lang-*.js" files in this directory for code that implements
- * per-language file handlers.
- *
- * Change log:
- * cbeust, 2006/08/22
- *
- * Java annotations (start with "@") are now captured as literals ("lit")
- *
- * @requires console
- */
-
-// JSLint declarations
-/*global console, document, navigator, setTimeout, window, define */
-
-/**
- * @typedef {!Array.}
- * Alternating indices and the decorations that should be inserted there.
- * The indices are monotonically increasing.
- */
-var DecorationsT;
-
-/**
- * @typedef {!{
- * sourceNode: !Element,
- * pre: !(number|boolean),
- * langExtension: ?string,
- * numberLines: ?(number|boolean),
- * sourceCode: ?string,
- * spans: ?(Array.),
- * basePos: ?number,
- * decorations: ?DecorationsT
- * }}
- *
- * - sourceNode
- the element containing the source
- *
- sourceCode
- source as plain text
- *
- pre
- truthy if white-space in text nodes
- * should be considered significant.
- *
- spans
- alternating span start indices into source
- * and the text node or element (e.g. {@code
}) corresponding to that
- * span.
- * - decorations
- an array of style classes preceded
- * by the position at which they start in job.sourceCode in order
- *
- basePos
- integer position of this.sourceCode in the larger chunk of
- * source.
- *
- */
-var JobT;
-
-/**
- * @typedef {!{
- * sourceCode: string,
- * spans: !(Array.)
- * }}
- *
- * - sourceCode
- source as plain text
- *
- spans
- alternating span start indices into source
- * and the text node or element (e.g. {@code
}) corresponding to that
- * span.
- *
- */
-var SourceSpansT;
-
-/** @define {boolean} */
-var IN_GLOBAL_SCOPE = true;
-
-
-/**
- * {@type !{
- * 'createSimpleLexer': function (Array, Array): (function (JobT)),
- * 'registerLangHandler': function (function (JobT), Array.),
- * 'PR_ATTRIB_NAME': string,
- * 'PR_ATTRIB_NAME': string,
- * 'PR_ATTRIB_VALUE': string,
- * 'PR_COMMENT': string,
- * 'PR_DECLARATION': string,
- * 'PR_KEYWORD': string,
- * 'PR_LITERAL': string,
- * 'PR_NOCODE': string,
- * 'PR_PLAIN': string,
- * 'PR_PUNCTUATION': string,
- * 'PR_SOURCE': string,
- * 'PR_STRING': string,
- * 'PR_TAG': string,
- * 'PR_TYPE': string,
- * 'prettyPrintOne': function (string, string, number|boolean),
- * 'prettyPrint': function (?function, ?(HTMLElement|HTMLDocument))
- * }}
- * @const
- */
-var PR;
-
-/**
- * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
- * UI events.
- * If set to {@code false}, {@code prettyPrint()} is synchronous.
- */
-var PR_SHOULD_USE_CONTINUATION = true
-if (typeof window !== 'undefined') {
- window['PR_SHOULD_USE_CONTINUATION'] = PR_SHOULD_USE_CONTINUATION;
-}
-
-/**
- * Pretty print a chunk of code.
- * @param {string} sourceCodeHtml The HTML to pretty print.
- * @param {string} opt_langExtension The language name to use.
- * Typically, a filename extension like 'cpp' or 'java'.
- * @param {number|boolean} opt_numberLines True to number lines,
- * or the 1-indexed number of the first line in sourceCodeHtml.
- * @return {string} code as html, but prettier
- */
-var prettyPrintOne;
-/**
- * Find all the {@code } and {@code } tags in the DOM with
- * {@code class=prettyprint} and prettify them.
- *
- * @param {Function} opt_whenDone called when prettifying is done.
- * @param {HTMLElement|HTMLDocument} opt_root an element or document
- * containing all the elements to pretty print.
- * Defaults to {@code document.body}.
- */
-var prettyPrint;
-
-
-(function () {
- var win = (typeof window !== 'undefined') ? window : {};
- // Keyword lists for various languages.
- // We use things that coerce to strings to make them compact when minified
- // and to defeat aggressive optimizers that fold large string constants.
- var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
- var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +
- "double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed," +
- "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
- var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
- "new,operator,private,protected,public,this,throw,true,try,typeof"];
- var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignas,alignof,align_union,asm,axiom,bool," +
- "concept,concept_map,const_cast,constexpr,decltype,delegate," +
- "dynamic_cast,explicit,export,friend,generic,late_check," +
- "mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert," +
- "static_cast,template,typeid,typename,using,virtual,where"];
- var JAVA_KEYWORDS = [COMMON_KEYWORDS,
- "abstract,assert,boolean,byte,extends,finally,final,implements,import," +
- "instanceof,interface,null,native,package,strictfp,super,synchronized," +
- "throws,transient"];
- var CSHARP_KEYWORDS = [COMMON_KEYWORDS,
- "abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending," +
- "dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface," +
- "internal,into,is,join,let,lock,null,object,out,override,orderby,params," +
- "partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong," +
- "unchecked,unsafe,ushort,value,var,virtual,where,yield"];
- var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
- "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
- "throw,true,try,unless,until,when,while,yes";
- var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
- "abstract,async,await,constructor,debugger,enum,eval,export,from,function," +
- "get,import,implements,instanceof,interface,let,null,of,set,undefined," +
- "var,with,yield,Infinity,NaN"];
- var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
- "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
- "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
- var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
- "elif,except,exec,finally,from,global,import,in,is,lambda," +
- "nonlocal,not,or,pass,print,raise,try,with,yield," +
- "False,True,None"];
- var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
- "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
- "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
- "BEGIN,END"];
- var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
- "function,in,local,set,then,until"];
- var ALL_KEYWORDS = [
- CPP_KEYWORDS, CSHARP_KEYWORDS, JAVA_KEYWORDS, JSCRIPT_KEYWORDS,
- PERL_KEYWORDS, PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
- var C_TYPES = /^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
-
- // token style names. correspond to css classes
- /**
- * token style for a string literal
- * @const
- */
- var PR_STRING = 'str';
- /**
- * token style for a keyword
- * @const
- */
- var PR_KEYWORD = 'kwd';
- /**
- * token style for a comment
- * @const
- */
- var PR_COMMENT = 'com';
- /**
- * token style for a type
- * @const
- */
- var PR_TYPE = 'typ';
- /**
- * token style for a literal value. e.g. 1, null, true.
- * @const
- */
- var PR_LITERAL = 'lit';
- /**
- * token style for a punctuation string.
- * @const
- */
- var PR_PUNCTUATION = 'pun';
- /**
- * token style for plain text.
- * @const
- */
- var PR_PLAIN = 'pln';
-
- /**
- * token style for an sgml tag.
- * @const
- */
- var PR_TAG = 'tag';
- /**
- * token style for a markup declaration such as a DOCTYPE.
- * @const
- */
- var PR_DECLARATION = 'dec';
- /**
- * token style for embedded source.
- * @const
- */
- var PR_SOURCE = 'src';
- /**
- * token style for an sgml attribute name.
- * @const
- */
- var PR_ATTRIB_NAME = 'atn';
- /**
- * token style for an sgml attribute value.
- * @const
- */
- var PR_ATTRIB_VALUE = 'atv';
-
- /**
- * A class that indicates a section of markup that is not code, e.g. to allow
- * embedding of line numbers within code listings.
- * @const
- */
- var PR_NOCODE = 'nocode';
-
-
- // Regex pattern below is automatically generated by regexpPrecederPatterns.pl
- // Do not modify, your changes will be erased.
-
- // CAVEAT: this does not properly handle the case where a regular
- // expression immediately follows another since a regular expression may
- // have flags for case-sensitivity and the like. Having regexp tokens
- // adjacent is not valid in any language I'm aware of, so I'm punting.
- // TODO: maybe style special characters inside a regexp as punctuation.
-
- /**
- * A set of tokens that can precede a regular expression literal in
- * javascript
- * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
- * has the full list, but I've removed ones that might be problematic when
- * seen in languages that don't support regular expression literals.
- *
- * Specifically, I've removed any keywords that can't precede a regexp
- * literal in a syntactically legal javascript program, and I've removed the
- * "in" keyword since it's not a keyword in many languages, and might be used
- * as a count of inches.
- *
- * The link above does not accurately describe EcmaScript rules since
- * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
- * very well in practice.
- *
- * @private
- * @const
- */
- var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
-
-
- /**
- * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
- * matches the union of the sets of strings matched by the input RegExp.
- * Since it matches globally, if the input strings have a start-of-input
- * anchor (/^.../), it is ignored for the purposes of unioning.
- * @param {Array.} regexs non multiline, non-global regexs.
- * @return {RegExp} a global regex.
- */
- function combinePrefixPatterns(regexs) {
- var capturedGroupIndex = 0;
-
- var needToFoldCase = false;
- var ignoreCase = false;
- for (var i = 0, n = regexs.length; i < n; ++i) {
- var regex = regexs[i];
- if (regex.ignoreCase) {
- ignoreCase = true;
- } else if (/[a-z]/i.test(regex.source.replace(
- /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
- needToFoldCase = true;
- ignoreCase = false;
- break;
- }
- }
-
- var escapeCharToCodeUnit = {
- 'b': 8,
- 't': 9,
- 'n': 0xa,
- 'v': 0xb,
- 'f': 0xc,
- 'r': 0xd
- };
-
- function decodeEscape(charsetPart) {
- var cc0 = charsetPart.charCodeAt(0);
- if (cc0 !== 92 /* \\ */) {
- return cc0;
- }
- var c1 = charsetPart.charAt(1);
- cc0 = escapeCharToCodeUnit[c1];
- if (cc0) {
- return cc0;
- } else if ('0' <= c1 && c1 <= '7') {
- return parseInt(charsetPart.substring(1), 8);
- } else if (c1 === 'u' || c1 === 'x') {
- return parseInt(charsetPart.substring(2), 16);
- } else {
- return charsetPart.charCodeAt(1);
- }
- }
-
- function encodeEscape(charCode) {
- if (charCode < 0x20) {
- return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
- }
- var ch = String.fromCharCode(charCode);
- return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
- ? "\\" + ch : ch;
- }
-
- function caseFoldCharset(charSet) {
- var charsetParts = charSet.substring(1, charSet.length - 1).match(
- new RegExp(
- '\\\\u[0-9A-Fa-f]{4}'
- + '|\\\\x[0-9A-Fa-f]{2}'
- + '|\\\\[0-3][0-7]{0,2}'
- + '|\\\\[0-7]{1,2}'
- + '|\\\\[\\s\\S]'
- + '|-'
- + '|[^-\\\\]',
- 'g'));
- var ranges = [];
- var inverse = charsetParts[0] === '^';
-
- var out = ['['];
- if (inverse) { out.push('^'); }
-
- for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
- var p = charsetParts[i];
- if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups.
- out.push(p);
- } else {
- var start = decodeEscape(p);
- var end;
- if (i + 2 < n && '-' === charsetParts[i + 1]) {
- end = decodeEscape(charsetParts[i + 2]);
- i += 2;
- } else {
- end = start;
- }
- ranges.push([start, end]);
- // If the range might intersect letters, then expand it.
- // This case handling is too simplistic.
- // It does not deal with non-latin case folding.
- // It works for latin source code identifiers though.
- if (!(end < 65 || start > 122)) {
- if (!(end < 65 || start > 90)) {
- ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
- }
- if (!(end < 97 || start > 122)) {
- ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
- }
- }
- }
- }
-
- // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
- // -> [[1, 12], [14, 14], [16, 17]]
- ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); });
- var consolidatedRanges = [];
- var lastRange = [];
- for (var i = 0; i < ranges.length; ++i) {
- var range = ranges[i];
- if (range[0] <= lastRange[1] + 1) {
- lastRange[1] = Math.max(lastRange[1], range[1]);
- } else {
- consolidatedRanges.push(lastRange = range);
- }
- }
-
- for (var i = 0; i < consolidatedRanges.length; ++i) {
- var range = consolidatedRanges[i];
- out.push(encodeEscape(range[0]));
- if (range[1] > range[0]) {
- if (range[1] + 1 > range[0]) { out.push('-'); }
- out.push(encodeEscape(range[1]));
- }
- }
- out.push(']');
- return out.join('');
- }
-
- function allowAnywhereFoldCaseAndRenumberGroups(regex) {
- // Split into character sets, escape sequences, punctuation strings
- // like ('(', '(?:', ')', '^'), and runs of characters that do not
- // include any of the above.
- var parts = regex.source.match(
- new RegExp(
- '(?:'
- + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set
- + '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape
- + '|\\\\x[A-Fa-f0-9]{2}' // a hex escape
- + '|\\\\[0-9]+' // a back-reference or octal escape
- + '|\\\\[^ux0-9]' // other escape sequence
- + '|\\(\\?[:!=]' // start of a non-capturing group
- + '|[\\(\\)\\^]' // start/end of a group, or line start
- + '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters
- + ')',
- 'g'));
- var n = parts.length;
-
- // Maps captured group numbers to the number they will occupy in
- // the output or to -1 if that has not been determined, or to
- // undefined if they need not be capturing in the output.
- var capturedGroups = [];
-
- // Walk over and identify back references to build the capturedGroups
- // mapping.
- for (var i = 0, groupIndex = 0; i < n; ++i) {
- var p = parts[i];
- if (p === '(') {
- // groups are 1-indexed, so max group index is count of '('
- ++groupIndex;
- } else if ('\\' === p.charAt(0)) {
- var decimalValue = +p.substring(1);
- if (decimalValue) {
- if (decimalValue <= groupIndex) {
- capturedGroups[decimalValue] = -1;
- } else {
- // Replace with an unambiguous escape sequence so that
- // an octal escape sequence does not turn into a backreference
- // to a capturing group from an earlier regex.
- parts[i] = encodeEscape(decimalValue);
- }
- }
- }
- }
-
- // Renumber groups and reduce capturing groups to non-capturing groups
- // where possible.
- for (var i = 1; i < capturedGroups.length; ++i) {
- if (-1 === capturedGroups[i]) {
- capturedGroups[i] = ++capturedGroupIndex;
- }
- }
- for (var i = 0, groupIndex = 0; i < n; ++i) {
- var p = parts[i];
- if (p === '(') {
- ++groupIndex;
- if (!capturedGroups[groupIndex]) {
- parts[i] = '(?:';
- }
- } else if ('\\' === p.charAt(0)) {
- var decimalValue = +p.substring(1);
- if (decimalValue && decimalValue <= groupIndex) {
- parts[i] = '\\' + capturedGroups[decimalValue];
- }
- }
- }
-
- // Remove any prefix anchors so that the output will match anywhere.
- // ^^ really does mean an anchored match though.
- for (var i = 0; i < n; ++i) {
- if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
- }
-
- // Expand letters to groups to handle mixing of case-sensitive and
- // case-insensitive patterns if necessary.
- if (regex.ignoreCase && needToFoldCase) {
- for (var i = 0; i < n; ++i) {
- var p = parts[i];
- var ch0 = p.charAt(0);
- if (p.length >= 2 && ch0 === '[') {
- parts[i] = caseFoldCharset(p);
- } else if (ch0 !== '\\') {
- // TODO: handle letters in numeric escapes.
- parts[i] = p.replace(
- /[a-zA-Z]/g,
- function (ch) {
- var cc = ch.charCodeAt(0);
- return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
- });
- }
- }
- }
-
- return parts.join('');
- }
-
- var rewritten = [];
- for (var i = 0, n = regexs.length; i < n; ++i) {
- var regex = regexs[i];
- if (regex.global || regex.multiline) { throw new Error('' + regex); }
- rewritten.push(
- '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
- }
-
- return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
- }
-
-
- /**
- * Split markup into a string of source code and an array mapping ranges in
- * that string to the text nodes in which they appear.
- *
- *
- * The HTML DOM structure:
- *
- * (Element "p"
- * (Element "b"
- * (Text "print ")) ; #1
- * (Text "'Hello '") ; #2
- * (Element "br") ; #3
- * (Text " + 'World';")) ; #4
- *
- *
- * corresponds to the HTML
- * {@code
print 'Hello '
+ 'World';
}.
- *
- *
- * It will produce the output:
- *
- * {
- * sourceCode: "print 'Hello '\n + 'World';",
- * // 1 2
- * // 012345678901234 5678901234567
- * spans: [0, #1, 6, #2, 14, #3, 15, #4]
- * }
- *
- *
- * where #1 is a reference to the {@code "print "} text node above, and so
- * on for the other text nodes.
- *
- *
- *
- * The {@code} spans array is an array of pairs. Even elements are the start
- * indices of substrings, and odd elements are the text nodes (or BR elements)
- * that contain the text for those substrings.
- * Substrings continue until the next index or the end of the source.
- *
- *
- * @param {Node} node an HTML DOM subtree containing source-code.
- * @param {boolean|number} isPreformatted truthy if white-space in
- * text nodes should be considered significant.
- * @return {SourceSpansT} source code and the nodes in which they occur.
- */
- function extractSourceSpans(node, isPreformatted) {
- var nocode = /(?:^|\s)nocode(?:\s|$)/;
-
- var chunks = [];
- var length = 0;
- var spans = [];
- var k = 0;
-
- function walk(node) {
- var type = node.nodeType;
- if (type == 1) { // Element
- if (nocode.test(node.className)) { return; }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- walk(child);
- }
- var nodeName = node.nodeName.toLowerCase();
- if ('br' === nodeName || 'li' === nodeName) {
- chunks[k] = '\n';
- spans[k << 1] = length++;
- spans[(k++ << 1) | 1] = node;
- }
- } else if (type == 3 || type == 4) { // Text
- var text = node.nodeValue;
- if (text.length) {
- if (!isPreformatted) {
- text = text.replace(/[ \t\r\n]+/g, ' ');
- } else {
- text = text.replace(/\r\n?/g, '\n'); // Normalize newlines.
- }
- // TODO: handle tabs here?
- chunks[k] = text;
- spans[k << 1] = length;
- length += text.length;
- spans[(k++ << 1) | 1] = node;
- }
- }
- }
-
- walk(node);
-
- return {
- sourceCode: chunks.join('').replace(/\n$/, ''),
- spans: spans
- };
- }
-
-
- /**
- * Apply the given language handler to sourceCode and add the resulting
- * decorations to out.
- * @param {!Element} sourceNode
- * @param {number} basePos the index of sourceCode within the chunk of source
- * whose decorations are already present on out.
- * @param {string} sourceCode
- * @param {function(JobT)} langHandler
- * @param {DecorationsT} out
- */
- function appendDecorations(
- sourceNode, basePos, sourceCode, langHandler, out) {
- if (!sourceCode) { return; }
- /** @type {JobT} */
- var job = {
- sourceNode: sourceNode,
- pre: 1,
- langExtension: null,
- numberLines: null,
- sourceCode: sourceCode,
- spans: null,
- basePos: basePos,
- decorations: null
- };
- langHandler(job);
- out.push.apply(out, job.decorations);
- }
-
- var notWs = /\S/;
-
- /**
- * Given an element, if it contains only one child element and any text nodes
- * it contains contain only space characters, return the sole child element.
- * Otherwise returns undefined.
- *
- * This is meant to return the CODE element in {@code
} when
- * there is a single child element that contains all the non-space textual
- * content, but not to return anything where there are multiple child elements
- * as in {@code ...
...
} or when there
- * is textual content.
- */
- function childContentWrapper(element) {
- var wrapper = undefined;
- for (var c = element.firstChild; c; c = c.nextSibling) {
- var type = c.nodeType;
- wrapper = (type === 1) // Element Node
- ? (wrapper ? element : c)
- : (type === 3) // Text Node
- ? (notWs.test(c.nodeValue) ? element : wrapper)
- : wrapper;
- }
- return wrapper === element ? undefined : wrapper;
- }
-
- /** Given triples of [style, pattern, context] returns a lexing function,
- * The lexing function interprets the patterns to find token boundaries and
- * returns a decoration list of the form
- * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
- * where index_n is an index into the sourceCode, and style_n is a style
- * constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to
- * all characters in sourceCode[index_n-1:index_n].
- *
- * The stylePatterns is a list whose elements have the form
- * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
- *
- * Style is a style constant like PR_PLAIN, or can be a string of the
- * form 'lang-FOO', where FOO is a language extension describing the
- * language of the portion of the token in $1 after pattern executes.
- * E.g., if style is 'lang-lisp', and group 1 contains the text
- * '(hello (world))', then that portion of the token will be passed to the
- * registered lisp handler for formatting.
- * The text before and after group 1 will be restyled using this decorator
- * so decorators should take care that this doesn't result in infinite
- * recursion. For example, the HTML lexer rule for SCRIPT elements looks
- * something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may match
- * '
-
-
-
-
-
-{% endif -%}
diff --git a/src/_includes/page-github-links.html b/src/_includes/page-github-links.html
deleted file mode 100644
index 6bd676b..0000000
--- a/src/_includes/page-github-links.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{% comment %}
-This include file requires the material icons fonts.
-Style the button pair using the `#page-github-links` selector.
-{% endcomment -%}
-
-{% assign repo = page.repo | default: site.repo.this -%}
-{% capture path -%} {{repo}}/tree/{{site.branch}}/{{site.source}}/{{page.path}} {%- endcapture -%}
-{% assign title = page.title | default: page.url -%}
-{% assign url = site.url | append: page.url -%}
-
-{% capture issueTitle -%} title=[PAGE ISSUE]: '{{title}}' {%- endcapture -%}
-
-
diff --git a/src/_includes/sidenav-level-1.html b/src/_includes/sidenav-level-1.html
deleted file mode 100644
index 331b787..0000000
--- a/src/_includes/sidenav-level-1.html
+++ /dev/null
@@ -1,37 +0,0 @@
-{% comment %} Canonicalize page URL path {% endcomment -%}
-{% assign page_url_path = page.url | regex_replace: '/index$|/index\.html$|\.html$|/$' -%}
-
-{% assign active_entries = include.nav | active_nav_entry_index_array: page_url_path -%}
-{% assign show_entries_wo_pages = false -%}
-
-
diff --git a/src/_includes/sidenav-level-2.html b/src/_includes/sidenav-level-2.html
deleted file mode 100644
index 33fe063..0000000
--- a/src/_includes/sidenav-level-2.html
+++ /dev/null
@@ -1,61 +0,0 @@
-{% for entry2 in entry1.children -%}
-
-{% assign class2 = 'nav-link' -%}
-{% assign isActive2 = false -%}
-{% if isActive1 and forloop.index == active_entries[1] -%}
- {% assign isActive2 = true -%}
- {% assign class2 = class2 | append: ' active' -%}
-{% endif -%}
-
-{% if entry2 == 'divider' -%}
-
-
-
-{%- elsif entry2.children == nil and entry2.permalink or show_entries_wo_pages -%}
-
-
- {{entry2.title}}
- {%- if entry2.permalink == nil %} (TBC)
- {%- elsif entry2.permalink contains '://' -%}
-
-
- {%- endif -%}
-
-
-{%- elsif entry2.children -%}
-
- {% assign class2 = class2 | append: ' collapsable' -%}
-
- {% if isActive2 or entry2.expanded -%}
- {% assign expanded = 'true' -%}
- {% assign show = 'show' -%}
- {% else -%}
- {% assign class2 = class2 | append: ' collapsed' -%}
- {% assign expanded = 'false' -%}
- {% assign show = '' -%}
- {% endif -%}
-
- {% assign id2 = id1 | append: '-' | append: forloop.index -%}
- {% assign href = entry2.permalink -%}
- {% unless href -%}
- {% assign href = '#' | append: id2 -%}
- {% endunless -%}
-
-
- {{entry2.title}}
-
-
-
-{% endif -%}
-{% endfor %}
diff --git a/src/_includes/sidenav-level-3.html b/src/_includes/sidenav-level-3.html
deleted file mode 100644
index 9273855..0000000
--- a/src/_includes/sidenav-level-3.html
+++ /dev/null
@@ -1,61 +0,0 @@
-{% for entry3 in entry2.children -%}
-
-{% assign class3 = 'nav-link' -%}
-{% assign isActive3 = false -%}
-{% if isActive2 and forloop.index == active_entries[2] -%}
- {% assign isActive3 = true -%}
- {% assign class3 = class3 | append: ' active' -%}
-{% endif -%}
-
-{% if entry3 == 'divider' -%}
-
-
-
-{%- elsif entry3.children == nil and entry3.permalink or show_entries_wo_pages -%}
-
-
- {{entry3.title}}
- {%- if entry3.permalink == nil %} (TBC)
- {%- elsif entry3.permalink contains '://' -%}
-
-
- {%- endif -%}
-
-
-{%- elsif entry3.children -%}
-
- {% assign class3 = class3 | append: ' collapsable' -%}
-
- {% if isActive3 or entry3.expanded -%}
- {% assign expanded = 'true' -%}
- {% assign show = 'show' -%}
- {% else -%}
- {% assign class3 = class3 | append: ' collapsed' -%}
- {% assign expanded = 'false' -%}
- {% assign show = '' -%}
- {% endif -%}
-
- {% assign id3 = id2 | append: '-' | append: forloop.index -%}
- {% assign href = entry3.permalink -%}
- {% unless href -%}
- {% assign href = '#' | append: id3 -%}
- {% endunless -%}
-
-
- {{entry3.title}}
-
-
-
-{% endif -%}
-{% endfor -%}
diff --git a/src/_includes/sidenav-level-4.html b/src/_includes/sidenav-level-4.html
deleted file mode 100644
index 2c8abce..0000000
--- a/src/_includes/sidenav-level-4.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{% for entry4 in entry3.children -%}
- {% if entry4.permalink or show_entries_wo_pages -%}
-
- {% assign class4 = 'nav-link' -%}
- {% assign isActive4 = false -%}
- {% if isActive3 and forloop.index == active_entries[3] -%}
- {% assign isActive4 = true -%}
- {% assign class4 = class4 | append: ' active' -%}
- {% endif -%}
-
-
- {{entry4.title}}
- {%- if entry4.permalink == nil %} (TBC)
- {%- elsif entry4.permalink contains '://' -%}
-
-
- {%- endif -%}
-
- {% endif -%}
-{% endfor -%}
diff --git a/src/_plugins/breadcrumb.rb b/src/_plugins/breadcrumb.rb
deleted file mode 100644
index 76e9006..0000000
--- a/src/_plugins/breadcrumb.rb
+++ /dev/null
@@ -1,136 +0,0 @@
-module Jekyll
-
- ##
- # Used with permission. Based on code posted at
- # biosphere.cc/software-engineering/jekyll-breadcrumbs-navigation-plugin/.
- #
- # Patch Jekyll's Page class
- class Page
-
- ##
- # We add a custom method to the page variable, that returns an ordered list of its
- # parent pages ready for iteration.
- def ancestors
- # STDERR.puts "---------"
- a = []
- url = self.url
- # STDERR.puts "Page is #{url.inspect}"
- if url.split(".")[-1] == "html" # ignore .css, .js, ...
- while url != "/index.html"
- pt = url.split("/")
- if pt.length <= 2 then
- url = "/index.html"
- else
- if pt[-1] != "index.html" then
- # go to directory index
- pt[-1] = "index.html"
- url = pt.join("/")
- else
- # one level up
- url = pt[0..-3].join("/") + "/index.html"
- end
-
- # skip homepage
- if url != "/index.html" then
- potential_page = get_page_from_url(url)
-
- # skip missing index.html pages
- if defined? potential_page.name then
- a << potential_page
- end
- end
- end
- end
-
- if a != nil then
- return a.reverse
- else
- return nil
- end
- end
- end
-
- ##
- # Make ancestors available in liquid
- alias orig_to_liquid to_liquid
- def to_liquid
- h = orig_to_liquid
- h['ancestors'] = self.ancestors
- return h
- end
-
- private
-
- ##
- # Gets Page object that has given url. Very efficient O(n) solution.
- def get_page_from_url(url)
- site.pages.each do |page|
- if page.url == url then
- return page
- end
- end
- end
- end
-end
-
-
-module Drops
- class BreadcrumbItem < Liquid::Drop
- extend Forwardable
-
- def_delegator :@page, :data
- def_delegator :@page, :url
-
- def initialize(page, payload)
- @payload = payload
- @page = page
- end
-
- def title
- @page.data["breadcrumb"] || @page.data["short-title"] || @page.data["title"]
- end
-
- def subset
- @page.data["subset"]
- end
- end
-end
-
-
-Jekyll::Hooks.register :pages, :pre_render do |page, payload|
- drop = Drops::BreadcrumbItem
-
- if page.url == "/"
- then payload["breadcrumbs"] = [
- drop.new(page, payload)
- ]
- else
- payload["breadcrumbs"] = []
- pth = page.url.split("/")
-
- 0.upto(pth.size - 1) do |int|
- joined_path = pth[0..int].join("/")
- item = page.site.pages.find { |page_| joined_path == "" && page_.url == "/" || page_.url.chomp("/") == joined_path }
- payload["breadcrumbs"] << drop.new(item, payload) if item
- end
- end
-end
-
-Jekyll::Hooks.register :documents, :pre_render do |documents, payload|
- drop = Drops::BreadcrumbItem
-
- if documents.url == "/"
- then payload["breadcrumbs"] = [
- drop.new(documents, payload)
- ]
- else
- payload["breadcrumbs"] = []
- pth = documents.url.split("/")
-
- 0.upto(pth.size - 1) do |int|
- joined_path = pth[0..int].join("/")
- item = documents.site.documents.find { |documents| joined_path == "" && documents.url == "/" || documents.url.chomp("/") == joined_path }
- payload["breadcrumbs"] << drop.new(item, payload) if item
- end
- end
-end
diff --git a/src/_plugins/code_diff.rb b/src/_plugins/code_diff.rb
deleted file mode 100644
index 93f7f2e..0000000
--- a/src/_plugins/code_diff.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (c) 2018, the project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-require 'liquid/tag/parser' # https://github.com/envygeeks/liquid-tag-parser
-require_relative 'code_diff_core'
-
-module Jekyll
-
- module Tags
-
- class CodeDiff < Liquid::Block
-
- def initialize(tag_name, string_of_args, tokens)
- super
- @args = Liquid::Tag::Parser.new(string_of_args).args
- @log_diffs = false
- end
-
- def render(liquid_context)
- helper = DartSite::CodeDiffCore.new
- helper.render(@args, super)
- end
-
- end
- end
-end
-
-Liquid::Template.register_tag('diff'.freeze, Jekyll::Tags::CodeDiff)
-
diff --git a/src/_plugins/code_diff_core.rb b/src/_plugins/code_diff_core.rb
deleted file mode 100644
index 477bf50..0000000
--- a/src/_plugins/code_diff_core.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (c) 2018, the project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-require 'nokogiri'
-require 'open3'
-require_relative 'dart_site_util'
-
-module DartSite
-
- class CodeDiffCore
-
- def initialize
- @log_diffs = false
- end
-
- def render(args, diff)
- return '' if diff.empty?
-
- # Get the indentation before the closing tag.
- indentation = _get_indentation_string(diff)
-
- diff = DartSite::Util.trim_min_leading_space(diff)
- lines = _diff(diff, args).split(/\n/)
-
- _log_puts ">> CodeDiff content (#{args}):\n#{diff}\n---\n" if @log_diffs
-
- # We're rendering to markdown, and we don't want the diff table HTML
- # to be adjacent to any text, otherwise the text might not be rendered
- # as a paragraph (e.g., esp. if inside an ).
- lines.unshift('')
- lines.push('')
-
- # Indent the table in case the diff is inside a markdown list,
- # which has its content indented.
- indented_lines = lines.map{|s| indentation + s}
- indented_lines.join("\n")
- end
-
- def _diff(unified_diff_text, args)
- _log_puts ">> Diff input:\n#{unified_diff_text}" if @log_diffs
- begin
- o, e, _s = Open3.capture3('npx diff2html --su hidden -i stdin -o stdout',
- stdin_data: unified_diff_text)
- _log_puts e if e.length > 0
- rescue Errno::ENOENT => _e
- raise "** ERROR: diff2html isn't installed or could not be found. " \
- 'To install with NPM run: npm install -g diff2html-cli'
- end
- doc = Nokogiri::HTML(o)
- doc.css('div.d2h-file-header span.d2h-tag').remove
- diff_html = doc.search('.d2h-wrapper')
- _trim_diff(diff_html, args) if args[:from] || args[:to]
- _log_puts "Diff output:\n#{diff_html.to_s[0, [diff_html.to_s.length, 100].min]}...\n" if @log_diffs
- diff_html.to_s
- end
-
- def _trim_diff(diff_html, args)
- # The code updater truncates the diff after `to`. Only trim before `from` here.
- # (We don't trim after `to` here because of an unwanted optimizing behavior of diff2html.)
- _log_puts ">>> from='#{args[:from]}' to='#{args[:to]}'" if @log_diffs
- inside_matching_lines = done = false
- diff_html.css('tbody.d2h-diff-tbody tr').each do |tr|
- if tr.text.strip.start_with?('@')
- tr.remove
- next
- end
- code_line = tr.xpath('td[2]//span').text
- inside_matching_lines = true if !done && !inside_matching_lines && code_line.match(args[:from] || '.')
- saved_inside_matching_lines = inside_matching_lines
- # if inside_matching_lines && args[:to] && code_line.match(args[:to])
- # inside_matching_lines = false
- # done = true;
- # end
- _log_puts ">>> tr (#{saved_inside_matching_lines}) #{code_line} -> #{tr.text.gsub(/\s+/, ' ')}" if @log_diffs
- tr.remove unless saved_inside_matching_lines
- end
- end
-
- def _get_indentation_string(diff)
- lines = diff.split(/\n/, -1)
- # Try to figure out if the diff is part of a Jekyll block or a markdown block.
- # For a Jekyll block, figure out the indentation from the whitespace before
- # the block closing tag. Otherwise, look at the indentation before the first line
- # (which should be a file specifier of the form '--- 1-base/lib/main.dart ...').
- line = lines.last.match?(/^[ \t]*$/) ? lines.last : lines[0]
- DartSite::Util.get_indentation_string(line)
- end
-
- def _log_puts(s)
- puts(s)
- end
-
- end
-end
diff --git a/src/_plugins/code_excerpt_framer.rb b/src/_plugins/code_excerpt_framer.rb
deleted file mode 100644
index c5d2672..0000000
--- a/src/_plugins/code_excerpt_framer.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-module DartSite
-
- # Takes the given code excerpt (with the given attributes) and creates
- # some framing HTML: e.g., a div with possible excerpt title in a header.
- class CodeExcerptFramer
- def frame_code(title, classes, attrs, escaped_code, indent, secondary_class)
- _unindented_template(title, classes, attrs, escaped_code.gsub('\\','\\\\\\\\'), secondary_class)
- end
-
- private
- # @param [String] div_classes, in the form "foo bar"
- # @param [Hash] attrs: attributes as attribute-name/value pairs.
- def _unindented_template(title, _div_classes, attrs, escaped_code, secondary_class)
- div_classes = ['code-excerpt']
- div_classes << _div_classes if _div_classes
-
- pre_classes = attrs[:class] || []
- pre_classes.unshift("lang-#{attrs[:lang]}") if attrs[:lang]
- pre_classes.unshift('prettyprint')
-
- # Was: escaped_code
!n
- # Also had:
-
- # Ensure that the template starts and ends with a blank line.
- # We're rendering to markdown, and we don't want the frame HTML
- # to be adjacent to any text, otherwise the text might not be rendered
- # as a paragraph (e.g., esp. if inside an ).
- <<~TEMPLATE.gsub(/!n\s*/,'').sub(/\bescaped_code\b/,escaped_code)
-
-
- #{title ? "#{title}" : '!n'}
- !n
- !n
- !n
- escaped_code!n
-
!n
-
!n
-
-
-
- TEMPLATE
- end
- end
-end
diff --git a/src/_plugins/code_excerpt_processor.rb b/src/_plugins/code_excerpt_processor.rb
deleted file mode 100644
index 940b8ec..0000000
--- a/src/_plugins/code_excerpt_processor.rb
+++ /dev/null
@@ -1,276 +0,0 @@
-##
-## Classes that support the processing of and
-## instructions.
-##
-
-require 'active_support'
-require 'active_support/isolated_execution_state'
-require 'active_support/core_ext/string'
-require 'open3'
-require 'nokogiri'
-require 'yaml'
-require_relative 'code_diff_core'
-require_relative 'dart_site_util'
-
-module DartSite
-
- class CodeExcerptProcessor
-
- # @param code_framer is used to wrap code blocks with HTML that provides
- # features like code block headers and a copy-code button.
- def initialize(code_framer)
- @@log_file_name = 'code-excerpt-log.txt'
- @@log_entry_count = 0
- @log_diffs = false
-
- File.delete(@@log_file_name) if File.exist?(@@log_file_name)
-
- # @site_title = Jekyll.configuration({})['title']
- @code_differ = DartSite::CodeDiffCore.new
- @code_framer = code_framer
- end
-
- def code_excerpt_regex
- /^(\s*(<\?(code-\w+)[^>]*>)\n)((\s*)```((\w*)([^\n]*))\n(.*?)\n(\s*)```\n?)?/m;
- end
-
- def code_excerpt_processing_init
- @path_base = ''
- end
-
- def process_code_excerpt(match)
- # pi_line_with_whitespace = match[1]
- pi = match[2] # full processing instruction
- pi_name = match[3]
- args = process_pi_args(pi)
- optional_code_block = match[4]
- indent = match[5]
- secondary_class = match[6]
- lang = !match[7] || match[7].empty? ? (args['ext'] || 'nocode') : match[7]
- attrs = mk_code_example_directive_attr(lang, args['linenums'])
-
- return process_code_pane(pi, attrs, args) if pi_name == 'code-pane'
-
- if pi_name != 'code-excerpt'
- log_puts "Warning: unrecognized instruction: #{pi}"
- return match[0]
- elsif !optional_code_block
- # w/o a code block assume it is a set cmd
- process_set_command(pi, args)
- return ''
- end
-
- code = match[9]
- leading_whitespace = get_indentation_string(optional_code_block)
- code = Util.trim_min_leading_space(code)
-
- if lang == 'diff'
- diff = @code_differ.render(args, code)
- diff.indent!(leading_whitespace.length) if leading_whitespace
- return diff
- end
-
- title = args['title']
- classes = args['class']
-
- # We escape all code fragments (not just HTML fragments),
- # because we're rendering the code block as HTML.
- escaped_code = CGI.escapeHTML(code)
-
- code = @code_framer.frame_code(title, classes, attrs, _process_highlight_markers(escaped_code), indent, secondary_class)
- code.indent!(leading_whitespace.length) if leading_whitespace
- code
- end
-
- def _process_highlight_markers(s)
- # Only replace [! and !] if both exist
- s.gsub(/\[!(.*?)!\]/m, '\1')
- end
-
- def trim_min_leading_space(code)
- lines = code.split(/\n/);
- non_blank_lines = lines.reject { |s| s.match(/^\s*$/) }
-
- # Length of leading spaces to be trimmed
- len = non_blank_lines.map{ |s|
- matches = s.match(/^[ \t]*/)
- matches ? matches[0].length : 0 }.min
-
- len == 0 ? code : lines.map{|s| s.length < len ? s : s[len..-1]}.join("\n")
- end
-
- # @return [Hash] of attributes as attribute-name/value pairs.
- # Supported attribute names (all optional):
- # - [Array] `:class`
- # - [String] `:lang`
- def mk_code_example_directive_attr(lang, linenums)
- classes = []
- classes << 'linenums' if linenums
- classes << 'nocode' if lang == 'nocode'
- attrs = {}
- attrs[:class] = classes unless classes.empty?
- attrs[:lang] = lang unless lang == 'nocode'
- attrs
- end
-
- # @param [Hash] attrs: attributes as attribute-name/value pairs.
- # @return [String] Attributes as a single string: 'foo="bar" baz="..."'
- def attr_str(attrs)
- attributes = []
- attrs.each do |name, value|
- attr_as_s = name.to_s
- value *= ' ' if value.kind_of?(Array)
- attr_as_s += %Q(="#{value}") if value
- attributes << attr_as_s
- end
- attributes * ' '
- end
-
- def process_pi_args(pi)
- # match = /<\?code-\w+\s*(("([^"]*)")?((\s+[-\w]+="[^"]*"\s*)*))\?>/.match(pi)
- match = /<\?code-\w+\s*(.*?)\s*\?>/.match(pi)
- unless match
- log_puts "ERROR: improperly formatted instruction: #{pi}"
- return nil
- end
-
- arg_string = match[1]
- args = { }
-
- # First argument can be unnamed. When present, it is saved as
- # args['']. It is used to define a path and an optional region.
- match = /^"(([^("]*)(\s+\(([^"]+)\))?)"/.match(arg_string)
- if match
- arg_string = $' # reset to remaining args
- args[''] = match[1]
- path = args['path'] = match[2]
- args['ext'] = File.extname(path)&.sub(/^\./,'')
- args['region'] = match[4]&.gsub(/[^\w]+/, '-') || ''
- end
-
- # Process remaining args
- arg_string.scan(/\b(\w[-\w]*)(="([^"]*)")?/) { |id,arg,val|
- if id == 'title' && !arg then val = trim_file_vers(args['']) end
- args[id] = val || ''
- }
- # puts " >> args: #{args}"
- args
- end
-
- # @param [Hash] attrs: attributes as attribute-name/value pairs.
- def process_code_pane(pi, _attrs, args)
- # TODO: support use of globally set replace args.
- title = args['title'] || trim_file_vers(args[''])
- escaped_code = get_code_frag(args['path'],
- full_frag_path(args['path'], args['region']),
- src_path(args['path'], args['region']),
- args['region'])
- # args['replace'] syntax: /regex/replacement/g
- # Replacement and '_g' are currently mandatory (but not checked)
- if args['replace']
- _, re, replacement, _g = args['replace'].split '/'
- escaped_code.gsub!(Regexp.new(re)) {
- match = Regexp.last_match
- # TODO: doesn't yet recognize escaped '$' ('\$')
- while (arg_match = /(?<=\$)(\d)(?!\d)/.match(replacement)) do
- next unless arg_match
- replacement.gsub!("$#{arg_match[0]}", match[arg_match[0].to_i])
- end
- if /\$\d+|\\\$/.match?(replacement)
- raise "Plugin doesn't support \\$, or more than 9 match groups $1, ..., $9: #{replacement}.\nAborting."
- end
- if replacement.include? '$&'
- replacement.gsub('$&', match[0])
- else
- replacement
- end
- }
- end
- escaped_code = _process_highlight_markers(escaped_code)
- attrs = {}
- attrs[:language] = _attrs[:lang] if _attrs[:lang]
- attrs[:format] = _attrs[:class] if _attrs[:class]
- <<~TEMPLATE
- #{pi}
- #{escaped_code}
- TEMPLATE
- end
-
- def process_set_command(_pi, args)
- # Ignore all commands other than path-base.
- path_base = args['path-base']
- return unless path_base
- @path_base = path_base.sub(/\/$/, '')
- # puts ">> path base set to '#{@path_base}'"
- end
-
- def get_code_frag(proj_rel_path, _frag_path, src_path, region)
- excerpt_yaml_path = File.join(Dir.pwd, 'tmp', '_fragments', @path_base, proj_rel_path + '.excerpt.yaml');
- if File.exist? excerpt_yaml_path
- yaml = YAML.load_file(excerpt_yaml_path)
- result = yaml[region]
- if result.nil?
- result = "CODE EXCERPT not found: region '#{region}' not found in #{excerpt_yaml_path}"
- log_puts result
- else
- lines = result.split(/(?<=\n)/) # split and keep separator
- result = escape_and_trim_code(lines)
- end
- # We don't generate frag_path fragments anymore:
- # elsif File.exists? frag_path
- # lines = File.readlines frag_path
- # result = escapeAndTrimCode(lines)
- elsif region.empty? && src_path && (File.exist? src_path)
- lines = File.readlines src_path
- result = escape_and_trim_code(lines)
- raise 'CODE EXCERPT not found: no .excerpt.yaml file ' \
- "and source contains docregions: #{src_path}" if result.include? '#docregion'
- else
- result = "CODE EXCERPT not found: #{excerpt_yaml_path}, region='#{region}'"
- log_puts result
- end
- result
- end
-
- def full_frag_path(proj_rel_path, region)
- frag_rel_path = File.join(@path_base, proj_rel_path)
- if region && !region.empty?
- dir = File.dirname(frag_rel_path)
- basename = File.basename(frag_rel_path, '.*')
- ext = File.extname(frag_rel_path)
- frag_rel_path = File.join(dir, "#{basename}-#{region}#{ext}")
- end
- frag_extension = '.txt'
- File.join(Dir.pwd, 'tmp', '_fragments', frag_rel_path + frag_extension)
- end
-
- def src_path(proj_rel_path, region)
- region == '' ? File.join(@path_base, proj_rel_path) : nil
- end
-
- def escape_and_trim_code(lines)
- # Skip blank lines at the end too
- while !lines.empty? && lines.last.strip == '' do lines.pop end
- CGI.escapeHTML(lines.join)
- end
-
- def log_puts(s)
- puts(s)
- file_mode = (@@log_entry_count += 1) <= 1 ? 'w' : 'a'
- File.open(@@log_file_name, file_mode) do |logFile| logFile.puts(s) end
- end
-
- def trim_file_vers(s)
- # Path/title like styles.1.css or foo_1.dart? Then drop the '.1' or '_1' qualifier:
- match = /^(.*)[._]\d(\.\w+)(\s+.+)?$/.match(s)
- s = "#{match[1]}#{match[2]}#{match[3]}" if match
- s
- end
-
- def get_indentation_string(s)
- match = s.match(/^[ \t]*/)
- match ? match[0] : nil
- end
-
- end
-end
diff --git a/src/_plugins/dart_site_util.rb b/src/_plugins/dart_site_util.rb
deleted file mode 100644
index 0f34e99..0000000
--- a/src/_plugins/dart_site_util.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-module DartSite
-
- class Util
-
- def self.get_indentation_string(s)
- s.match(/^[ \t]*/)[0]
- end
-
- # String to string transformation.
- def self.trim_min_leading_space(code)
- lines = code.split(/\n/);
- non_blank_lines = lines.reject { |s| s.match(/^\s*$/) }
-
- # Length of leading spaces to be trimmed
- len = non_blank_lines.map{ |s|
- matches = s.match(/^[ \t]*/)
- matches ? matches[0].length : 0 }.min
-
- len == 0 ? code : lines.map{|s| s.length < len ? s : s[len..-1]}.join("\n")
- end
-
- # This method is for trimming the content of Jekyll blocks.
- #
- # @return a copy of the input lines array, with lines unindented by the
- # maximal amount of whitespace possible without affecting relative
- # (non-whitespace) line indentation. Also trim off leading and trailing blank lines.
- def self.block_trim_leading_whitespace(lines)
- # 1. Trim leading blank lines
- while lines.first =~ /^\s*$/ do lines.shift; end
-
- # 2. Trim trailing blank lines. Also determine minimal
- # indentation for the entire block.
-
- # Last line should consist of the indentation of the end tag
- # (when it is on a separate line).
- last_line = lines.last =~ /^\s*$/ ? lines.pop : ''
- while lines.last =~ /^\s*$/ do lines.pop end
- min_len = last_line.length
-
- non_blank_lines = lines.reject { |s| s.match(/^\s*$/) }
-
- # 3. Determine length of leading spaces to be trimmed
- len = non_blank_lines.map{ |s|
- matches = s.match(/^[ \t]*/)
- matches ? matches[0].length : 0 }.min
-
- # Only trim the excess relative to min_len
- len = len < min_len ? min_len : len - min_len
-
- len == 0 ? lines : lines.map{|s| s.length < len ? s : s.sub(/^[ \t]{#{len}}/, '')}
- end
- end
-end
diff --git a/src/_plugins/markdown_with_code_excerpts.rb b/src/_plugins/markdown_with_code_excerpts.rb
deleted file mode 100644
index cf1672c..0000000
--- a/src/_plugins/markdown_with_code_excerpts.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-require_relative 'code_excerpt_processor'
-
-module Jekyll
- module Converters
-
- # This converter does some markdown preprocessing before using [Kramdown] to
- # do the full markdown conversion (to HTML).
- #
- # Currently, the only preprocessing that is done is for code-excerpt
- # instructions. See [code_excerpt_processor.rb] for details.
- #
- module MarkdownWithCodeExcerptsConverterMixin
- # Ensure subclass sets the following property:
- #
- # priority :high
-
- def matches(ext)
- ext =~ /^\.md$/i
- end
-
- def output_ext(_ext)
- '.html'
- end
-
- end
-
- class MarkdownWithCodeExcerpts
- def initialize(config = {}, code_framer = nil)
- @config = config
- @code_framer = code_framer || IdentityCodeFramer.new
- end
-
- def convert(content)
- @cep ||= DartSite::CodeExcerptProcessor.new(@code_framer)
- @cep.code_excerpt_processing_init
- content.gsub!(@cep.code_excerpt_regex) {
- @cep.process_code_excerpt(Regexp.last_match)
- }
-
- @base_conv ||= Markdown::KramdownParser.new(@config)
- @base_conv.convert(content)
- end
- end
-
- class IdentityCodeFramer
- def frame_code(title, classes, attrs, escaped_code, indent, secondary_class)
- escaped_code
- end
- end
- end
-end
diff --git a/src/_plugins/prettify.rb b/src/_plugins/prettify.rb
deleted file mode 100644
index 4845b6d..0000000
--- a/src/_plugins/prettify.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-require 'liquid/tag/parser' # https://github.com/envygeeks/liquid-tag-parser
-require_relative 'dart_site_util'
-require_relative 'prettify_core'
-
-module Jekyll
-
- module Tags
-
- # Liquid Block plugin to render code that gets
- # prettified by https://github.com/google/code-prettify.
- #
- # Arguments:
- #
- # - The first unnamed optional argument is the prettifier lang argument.
- # Use 'nocode' or 'none' as the language to turn off prettifying.
- # - class="...". CSS classes to be added to the opening tag.
- # - context="html". When unspecified, the context is assumed to be markdown.
- # In markdown, indentation of the block is preserved, in HTML the block
- # isn't indented.
- # - tag="...". See [PrettifyCore.code2html()] for a description of
- # accepted tag specifiers. Defaults to 'pre'.
- #
- # Code highlighting is supported; see see [PrettifyCore] for details.
- #
- # Example usage:
- #
- # {% prettify dart %}
- # var hello = 'world';
- # {% endprettify %}
- #
- class Prettify < Liquid::Block
-
- def initialize(tag_name, string_of_args, tokens)
- super
- @args = Liquid::Tag::Parser.new(string_of_args).args
- end
-
- def render(_context)
- helper = DartSite::PrettifyCore.new
- helper.code2html(super,
- lang: @args[:argv1],
- context: @args[:context] || 'markdown',
- tag_specifier: @args[:tag],
- user_classes: @args[:class])
- end
-
- end
- end
-end
-
-Liquid::Template.register_tag('prettify', Jekyll::Tags::Prettify)
diff --git a/src/_plugins/prettify_core.rb b/src/_plugins/prettify_core.rb
deleted file mode 100644
index 6b4124c..0000000
--- a/src/_plugins/prettify_core.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-require 'cgi'
-require_relative 'dart_site_util'
-
-module DartSite
-
- # Base class used by some Liquid Block plugins to render code that gets
- # prettified by https://github.com/google/code-prettify.
- #
- # The following markup syntax can be used to apply a CSS class to a span
- # of code:
- #
- # `[[foo]]some code[[/foo]]`
- #
- # will render as
- #
- # `some code`
- #
- # Note that `[[highlight]]...[[/highlight]]` can be abbreviated using the
- # following shorthand: `[!...!]`.
- #
- class PrettifyCore
-
- # @param code [String], raw code to be converted to HTML.
- # @param lang [String], e.g., 'dart', 'json' or 'yaml'
- # @param tag_specifier [String] matching "pre|pre+code|code|code+br".
- # This is the HTML element used to wrap the prettified
- # code. The `code` element is used for `code+br`; in addition,
- # newlines in the code excerpt are reformatted at `
` elements.
- # @param user_classes [String] zero or more space separated CSS class names
- # to be applied to the outter-most enclosing tag.
- # @param context [String] 'html' or 'markdown' (default), represents whether
- # the tag is being rendered in an HTML or a markdown document. Indentation
- # is preserved for markdown but not for HTML.
- def code2html(code, lang: nil, context: 'markdown', tag_specifier: 'pre', user_classes: nil)
- tag = _get_real_tag(tag_specifier || 'pre')
- css_classes = _css_classes(lang, user_classes)
- class_attr = css_classes.empty? ? '' : " class=\"#{css_classes.join(' ')}\""
-
- out = "<#{tag}#{class_attr}>"
- out += '' if tag_specifier == 'pre+code'
-
- code = context == 'markdown' ?
- Util.block_trim_leading_whitespace(code.split(/\n/)).join("\n") :
- Util.trim_min_leading_space(code)
- # Strip leading and trailing whitespace so that and
tags wrap tightly
- code.strip!
- code = CGI.escapeHTML(code)
-
- if tag_specifier == 'code+br'
- code.gsub!(/\n[ \t]*/) { |s|
- "
\n#{' ' * (s.length - 1)}"
- }
- end
-
- # Names of tags previously supported: highlight, note, red, strike.
- code.gsub!(/\[\[([\w-]+)\]\]/, '')
- code.gsub!(/\[\[\/([\w-]*)\]\]/, '')
-
- # Flutter tag syntax variant:
- code.gsub!(/\/\*\*([\w-]+)\*\//, '')
- code.gsub!(/\/\*-([\w-]*)\*\//, '')
-
- code.gsub!('[!', '')
- code.gsub!('!]', '')
-
- out += code
- out += '
' if tag_specifier == 'pre+code'
- out += "#{tag}>"
- end
-
- private
-
- def _css_classes(lang, user_classes)
- css_classes = []
- unless lang == 'nocode' || lang == 'none'
- css_classes << 'prettyprint'
- css_classes << "lang-#{lang}" if lang
- end
- css_classes << user_classes if user_classes
- css_classes
- end
-
- # Returns the word before the '+' if tag_specifier contains a '+',
- # tag_specifier otherwise
- def _get_real_tag(tag_specifier)
- tag_specifier[/^[^\+]+(?=\+)/] || tag_specifier
- end
- end
-end
diff --git a/src/_plugins/regex_replace_filter.rb b/src/_plugins/regex_replace_filter.rb
deleted file mode 100644
index 262b049..0000000
--- a/src/_plugins/regex_replace_filter.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-module RegexReplaceFilter
- # From https://github.com/Shopify/liquid/issues/202#issuecomment-19112872
- def regex_replace(input, regex, replacement = '')
- input.to_s.gsub(Regexp.new(regex), replacement.to_s)
- end
-end
-
-Liquid::Template.register_filter(RegexReplaceFilter)
diff --git a/src/_plugins/sidenav-active-entry-filter.rb b/src/_plugins/sidenav-active-entry-filter.rb
deleted file mode 100644
index eaf418d..0000000
--- a/src/_plugins/sidenav-active-entry-filter.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-module ActiveNavEntries
-
- def active_nav_entry_index_array(nav_entry_tree, page_url_path = '')
- active_entry_indexes = _get_active_nav_entries(nav_entry_tree, page_url_path)
- active_entry_indexes.empty? ? nil : active_entry_indexes
- end
-
- # @return array of indices to active nav entries.
- def _get_active_nav_entries(nav_entry_tree, page_url_path = '')
- nav_entry_tree.each_with_index do |entry, i|
- if entry['children']
- descendant_indexes = _get_active_nav_entries(entry['children'], page_url_path)
- return [i+1] + descendant_indexes unless descendant_indexes.empty?
- end
-
- next unless entry['permalink']
-
- is_active = if entry['match-page-url-exactly']
- page_url_path == entry['permalink']
- else
- page_url_path.include? entry['permalink']
- end
-
- return [i+1] if is_active
- end
- []
- end
-end
-
-Liquid::Template.register_filter(ActiveNavEntries)
diff --git a/src/_plugins/symlinked_sources_listener.rb b/src/_plugins/symlinked_sources_listener.rb
deleted file mode 100644
index 522cd80..0000000
--- a/src/_plugins/symlinked_sources_listener.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# Inspired by: https://willnorris.com/2014/12/watching-symlinked-directories-with-jekyll
-
-require 'find'
-require 'jekyll-watch'
-require 'listen'
-
-module Jekyll
- module Watcher
- def build_listener(site, options)
- dirs = [options['source']]
- symLinkedSources = options['symlinked-sources']
- dirs += symLinkedSources if symLinkedSources
- # puts ">> will watch #{dirs}"
- Listen.to(
- *dirs,
- :ignore => listen_ignore_paths(options),
- :force_polling => options['force_polling'],
- &(listen_handler(site))
- )
- end
- end
-end
\ No newline at end of file
diff --git a/src/robots.txt b/src/robots.txt
deleted file mode 100644
index 6fdba7b..0000000
--- a/src/robots.txt
+++ /dev/null
@@ -1,16 +0,0 @@
----
-layout: none
----
-
-{% comment %}
-
-This is the default robots file used when serving locally or on staging servers.
-Instructions for deploying to the site's official server are in the README.md.
-
-{% endcomment -%}
-
-User-agent: linkcheck
-Disallow:
-
-User-agent: *
-Disallow: /
diff --git a/src/sitemap.xml b/src/sitemap.xml
deleted file mode 100644
index d0ae481..0000000
--- a/src/sitemap.xml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-layout: null
-sitemap: false
----
-
-
-{% assign collections = site.collections | map: 'label' | join: ',' | prepend: 'pages,' | split: ',' | sort -%}
-
-{%- for colName in collections -%}
-{% assign pages = site[colName] | sort: 'url' -%}
-
-{%- for page in pages -%}
-
-{%- unless page.sitemap == false -%}
-
- {{ site.url | append: page.url | regex_replace: '/index(\.html)?$|\.html$|/$' }}
-
- {%- if page.sitemap.lastmod -%}
- {{ page.sitemap.lastmod | date: "%Y-%m-%d" }}
- {%- else -%}
- {{ site.now | default: page.date | default: site.time | date_to_xmlschema }}
- {%- endif -%}
-
- {{ page.sitemap.changefreq | default: 'monthly' }}
- {% if page.sitemap.priority -%}
- {{ page.sitemap.priority }}
- {%- endif -%}
-
-{% endunless -%}
-
-{%- endfor -%}
-
-{%- endfor -%}
-