* Cache archived asset JS/CSS for a day
* Don't waste time with ETag calculations
* Add a comment about the expiration length
* Cache images and fonts for a day
* Cache GraphQL data files for a week
* Set Fastly surrogate-key header on all responses
* Update test to account for new response header
* Throw in some code that should fail a test
* Remove read-frontmatter behavior
* Unskip the test that would catch this
* Remove the throw to pass the test
### Why:
A lot of content gets mistranslated, some common patterns are: frontmatter date and enums getting translated, liquid tags get translated or go missing during the translation process. These translation errors are tough to catch, especially when they often come in huge PRs.
### What's being changed:
- Frontmatter is also getting linted against schema as part of `lint-files`
- When an environment variable `TEST_TRANSLATION` is passed,
- `lint-files` will run its tests against all files that have been newly translated (by git-diffing between `translations` branch and `main` branch), and
- results are outputted using a custom jest reporter. The output is formatted in a way that makes it easy to exclude the problematic translated files from being merged, and to share the errors with [localization support](https://github.com/github/localization-support/issues/489).
- Run the implemented translation test as part of the existing `Node.js Tests - Translations` workflow
* Add markdown parsing dependencies
* Use it for the link test
* Use ast tests for hard-coded language
* Dedupe visiting for links
* Add new mdast utils to check-deps exclusions
* Move site search to use an endpoint
* Update browser.js
* Update search.js
* Update lib/search/versions.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Fix URLs
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* get link liquid tag to accept variables as param
* new liquid tag `link_as_article_card`
* refactor link liquid tag slightly so we can control what props get rendered
* generalize filterCodeExample to use in all guides section
* pass in `js-filter-card-max` instead of hardcode max
* tweaks and add `data` to CSP for images
* add liquid tag tests
* add some browser tests for card filters
* we still need to rely on `getPathWithLanguage` for hrefs that already have the language code embedded
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
* remove unnecessary `render` methods
* we don't use `link_with_short_title` anymore
* remove `shortTitle` option
* remove ink_with_short_title tag test
* Add read-frontmatter.js
* Use it
* Page static read/init are async now
* Fix some blockers
* I'm confused
* Fix some more bugs
* Use frontmatter schema, ensure end fence exists
* Fix a bug
* Still read full contents for index.md files
* Remove comment
* Only get ToC items for index pages
* Readd frontmatter error and verdadero handling
* Fix some borked tests
* Simplify the code
* Add a comment
* Remove redundant variable
* Re-simplify the Page construction
* End chunk _after_ endline
* Just use Page.init