1
0
mirror of synced 2025-12-21 10:57:10 -05:00
Commit Graph

50 Commits

Author SHA1 Message Date
Sarah Schneider
ff718d7fc1 Merge branch 'main' of github.com:github/docs-internal into github-ae-release-notes 2021-05-24 10:00:07 -04:00
Sarah Schneider
5978edb47b remove feature flagged code 2021-05-20 10:01:33 -04:00
Kevin Heis
f6acb1f08a Update dependencies (#19408)
* Update dependencies 2

* Lint fixes

* Update graphql packages

* Update changelog-entry.json

* Update @octokit/rest

* Update commander with help from @rachmari

@rachmari

* Upgrade helmet

* Upgrade js-yaml

* Update server.js

* Update cheerio

* Revert "Update cheerio"

This reverts commit 8aa17c39fbf564ee554037d89e7a473027d16984.
2021-05-19 17:32:47 +00:00
Mike Surowiec
eaddbc5db7 feat: add nextjs middleware handling (#19139)
* feat: add nextjs middleware handling split

* fix: eslint errors

* fix: filter boolean from csp list

* fix: feature flag nextjs server start

* feat: add prettier rules for ts,tsx files

* fix: remove unnecessary async from next middleware

* fix: next middleware name

* Update tsconfig.json

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Update next-env.d.ts

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* fix: add typescript linting to lint command

* add comment for unsafe-eval, update webpack to use eval in development

* fix: feature flag typo

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-05-05 15:23:46 +00:00
Sarah Schneider
757a5961cc delete no longer needed layout file and middleware 2021-04-26 15:36:08 -04:00
Sarah Schneider
a22691b082 update middleware/categories-for-support 2021-04-21 10:45:37 -04:00
Sarah Schneider
b5ffeb8e73 parse Liquid in titles in siteTree and use full titles in generic TOC but short titles in sidebar 2021-04-20 14:02:12 -04:00
Sarah Schneider
26c351f4ff Merge branch 'main' of github.com:github/docs-internal into update-new-site-tree-deps 2021-04-15 14:46:27 -04:00
Sarah Schneider
d1524b16a5 add feature flagged middleware 2021-04-15 14:46:16 -04:00
Sarah Schneider
18b91cd3b1 Merge branch 'main' into update-categories-json 2021-04-15 10:29:46 -04:00
Sarah Schneider
15ff2e2e98 update categories-for-support-team middleware 2021-04-14 10:34:49 -04:00
Sarah Schneider
1623191243 extract layout handling into separate middleware 2021-04-13 14:24:06 -04:00
Vanessa Yuen
bbd9f03f6e Populate product-landing "What's new" section using GitHub Changelog (#18328)
Co-authored-by: Jason Etcovitch <jasonetco@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
2021-04-08 20:51:37 +00:00
James M. Greene
c940dcd98b Middleware overhaul! (#18218)
* Middleware overhaul!

- Remove unnecessary 'async' keywords from middleware functions
- Ensure all middleware functions we create have names
- Wrap the method contents of all async middleware functions in a try-catch+next(error) pattern

* Use asyncMiddleware wrapper instead of try-catch+next(error) pattern

* Remove unnecessary try-catch+next(error) pattern from context middleware
2021-03-11 01:12:41 +00:00
James M. Greene
92ac830a44 Do not timeout requests during testing (#18206)
* Do not load the timeout middleware during testing

* Run the link-check-server in testing mode to avoid loading the timeout middleware

* Revert the change to 'package.json'

* Also consider GITHUB_ACTIONS to be a testing environment to support the link checkers
2021-03-10 11:40:25 -06:00
James M. Greene
fd7d0eeb1a Add timeout and abort middleware and processing halts (#18177)
* Add middleware to timeout requests after a period

* Add halt-on-dropped-connection middleware to stop the middleware processing stack if the connection was already dropped

* Add a few strategic bail-out spots for dropped connections during the render-page middleware

* Handle 404s and HEAD requests earlier in the page rendering flow

* Add a few more strategic bail-out spots for dropped connections during the render-page middleware

* Add middleware to notice aborted requests

* Add a check for aborted requests into the isConnectionDropped logic

* Reformat comment for consistency

* Handle aborted requests correctly in the error handler

* Explicit returns for consistency
2021-03-09 19:14:02 +00:00
Sarah Schneider
063e22d151 re-combine release notes middleware 2021-03-08 15:03:34 -05:00
Sarah Schneider
8eb1e69586 separate the middleware for enterprise server vs. github-ae release notes 2021-03-01 17:03:33 -05:00
Kevin Heis
1918d2ea14 Inline CSRF token in HTML (#17748)
* Inline CSRF token

* Fix tests
2021-02-09 22:08:24 +00:00
James M. Greene
a40ff31b4b Cache more assets both in browser + Fastly (#17663)
* 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
2021-02-03 22:16:54 +00:00
James M. Greene
8f133cbf54 Disallow both Fastly AND the browser from caching HTML pages (#17641) 2021-02-02 21:37:41 +00:00
James M. Greene
e53d1b7982 Set cache control for our JS/CSS assets to be kept for 28 days (#17636) 2021-02-02 13:34:37 -06:00
Jason Etcovitch
58319a221c Instrument all of our middleware (#17527)
* Add instrument-middleware.js

* Make it do some fancy require-ing

* Use it

* Prefix names

* dot prefix

* Improve async detection

* Add some comments

* Can't instrument error handler
2021-01-27 17:29:30 -05:00
Vanessa Yuen
9bc90cd932 Learning Track navigation banner (#17440)
* add middleware to handle `learn` query param

* add exception to query-less cache key

* add querystring to learning track guides
2021-01-25 16:57:32 +00:00
Kevin Heis
2fb2e962bc Move site search to use an endpoint (#17359)
* 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>
2021-01-20 15:37:42 +00:00
Kevin Heis
c62f49aa0e Block indexing not crawling (#17044)
* Block indexing instead of crawling

* Lint

* Update deprecated-enterprise-versions.js

* Combine loops
2020-12-17 11:57:18 -08:00
Jason Etcovitch
eaf2a67fa1 Use connectDatadog(e) (#16888)
* npm i connect-datadog

* Add connectDatadog middleware

* Add comments

* Use DD_API_KEY to gate

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
2020-12-11 13:13:18 -05:00
Sarah Schneider
cada14981b Merge branch 'main' of github.com:github/docs-internal into list-of-deprecated-versions 2020-12-09 22:05:26 -05:00
Sarah Schneider
3ca261ac82 add Developer deprecated docs to the list and also add a mini-toc 2020-12-08 10:38:39 -05:00
Sarah Schneider
dc38acdde8 support custom Early Access breadcrumbs 2020-12-07 16:18:03 -05:00
Sarah Schneider
c98ed3a159 add enterprise release list middleware 2020-12-06 20:43:33 -05:00
Sarah Schneider
77576177b1 move early-access link middleware to contextualizers 2020-12-01 16:20:09 -05:00
Sarah Schneider
b244d447dd Merge branch 'main' of github.com:github/docs-internal into hidden-docs-alt 2020-12-01 12:38:48 -05:00
Jason Etcovitch
cc719ffb6f Render Enterprise release notes on docs.github.com (#16367)
* Create basic layout

* Create stubbed out release note YAML

* Get a real implementation going

* Simplify using site-data

* Add a real page to send from render-page.js

* Use array of patches

* Render patches

* Add sidebar and breadcrumbs

* Reverse order

* Add date

* Tweak labels

* Redirect to entweb for missing versions

* Render patch.intro

* Move to separate files for patches

* Show support for RC versions

* Improve some comments

* Sticky headers!

* Remove a console log

* Improve example formatting

* Add a link on /admin

* Add a schema and test

* Move to /index.md, add version_num filter

* Improve layout

* Use <details>

* Placeholder more realistic notes

* Don't require links in index pages

* Remove admin/index link for now

* Remove unused frontmatter field

* Add a test for middleware

* Fix remaining YAML file to test CI

* Update 2-rc.yml

* Don't call it RC

* Just push

* Make a main a div

* Fix a borked class

* Lint YAML files

* Improve Download link

Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>

* Improve check order

* Move to contextualizers

* Use alternative version thing

Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>

* Move back to `release-notes.md`

* Use version for anchor IDs

* Undo category-pages test change

* Fix borked details layout in Chrome

* Improve mobile setup

* Render markdown in note tags

* Use allVersions[currentVersion] again

Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>

* Undo change to extended-markdown

* Add whitespace so it renders markdown bits

* Remove 2-22 files

* Add check for any release notes

* Fix the failing tests

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
2020-11-20 13:33:11 -05:00
Kevin Heis
890e86cc46 Merge branch 'main' into hidden-docs-alt 2020-11-17 09:58:45 -08:00
Kevin Heis
08880d9ecb Sort middleware by categories (#16494) 2020-11-17 09:49:10 -08:00
Kevin Heis
dd02bfa007 Merge main 2020-11-16 10:07:53 -08:00
Sarah Schneider
0df213dea6 add the barest minimal dev-toc 2020-11-13 14:31:59 -05:00
Sarah Schneider
5705d334ca Header notification updates (#16425)
* remove middleware that sets notification flags

* move all notification handling into includes/header-notification.html

* update tests
2020-11-12 16:27:29 -05:00
James M. Greene
287ee2050c EA context middleware cleanup 2020-11-11 00:30:40 -06:00
James M. Greene
1b3af6e8c5 Add Early Access context via middleware to show list of pages 2020-11-11 00:28:12 -06:00
James M. Greene
e1f3f6457e Merge branch 'main' into hidden-docs-alt 2020-11-09 13:09:52 -06:00
James M. Greene
f410fd175c Mostly reverting github/docs-internal#15313 2020-11-09 13:07:04 -06:00
Sarah Schneider
dfb29cfb59 Remove no longer needed middleware (#16384)
* remove no longer needed middleware

* remove accompanying test
2020-11-06 14:14:28 -05:00
Kevin Heis
93849795e0 Record redirect events (#16181)
* Record redirect events

* Update index.js

* Update record-redirect.js

* Only run when it can send to Hydro

* Update record-redirect.js
2020-10-26 10:18:42 -07:00
Kevin Heis
380c4dcc82 Hydro exit event (#16067)
* Start a basic exit event

* Combine to one performance function

* Lint

* Fancy operators

* Update events.js

* Update events.js

* Update cookie-settings.js

* Add scroll tracking

* Tell "standard" to use babel-eslint

* Throttle scroll tracking

* Lint

* Use sendBeacon

* Update index.js
2020-10-21 09:42:02 -07:00
Chiedo John
9f10fdd033 Improve performance of csrf errors (#16136)
* Improve performance of csrf errors

* Fix handle csrf error middleware

Co-authored-by: Chiedo <chiedo@users.noreply.github.com>
2020-10-20 11:42:05 -04:00
Kevin Heis
7c0c493c35 Sending events to POST /events endpoint (#15796) 2020-10-08 09:24:41 -07:00
Sarah Schneider
aa5a62d49d Remove versions feature flag code (#15793)
* remove FEATURE_NEW_VERSIONS from feature-flags.json

* remove process.env.FEATURE_NEW_VERSIONS from include files

* remove process.env.FEATURE_NEW_VERSIONS from lib files

* remove process.env.FEATURE_NEW_VERSIONS from middleware files

* remove process.env.FEATURE_NEW_VERSIONS from script files

* remove process.env.FEATURE_NEW_VERSIONS from test files

* update test fixtures to use new versions as canonical fixtures
2020-09-29 13:36:07 -04:00
Vanessa Yuen
3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00