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

384 Commits

Author SHA1 Message Date
Kevin Heis
4d0e9c70a3 Add new fields to analytics event context: status, page_type, page_document_type (#21115)
* Add new fields to analytics event context: status, page-type, page-document-type

* Update schema-event.js

* Typescript

* Add status meta to error pages

* Update DefaultLayout.tsx

* Update DefaultLayout.tsx

* Update building-and-testing-nodejs-or-python.tsx
2021-08-26 14:58:45 -07:00
Mike Surowiec
06d8f81401 Two-pane Experiment (#21092)
* pull changes from docs-playground

* cleanup, add callout banner

* cleanup linting and test fixes

* add discussion link

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-08-26 14:19:40 -04:00
Rachael Sewell
c7ac98304a allow use of full titles on landing page (#20327) 2021-08-25 12:31:16 -07:00
Laura Coursen
60b0d95f0d Hide the GitHub Insights docs (#20414) 2021-08-25 18:36:35 +00:00
Kevin Heis
86b6b1ad6f Remove storybook (#21037)
* Remove storybook

* Update index.js
2021-08-23 12:07:54 -07:00
Kevin Heis
8d7bb82e47 Add basic auth to storybook (#20955)
* Add basic auth to storybook

* Update index.js

* Update index.js
2021-08-18 14:03:35 -07:00
Kevin Heis
ae7b652463 Create a storybook with callout component (#20902)
* Create a storybook with callout component

* Add to dist/storybook

* Remove references to dist dir, storybook takes place

* Update Callout.stories.tsx

* Update Dockerfile

* Update Dockerfile
2021-08-17 20:28:59 +00:00
Robert Sese
b9ee89fc46 Add redirects for language-less homepage requests (#20494)
* Redirect homepage to user's language

* Redirect URLs with no language code

* Add leading forward slash

* Revert "Redirect URLs with no language code"

This reverts commit f817ac1136ea0c7e11c4d61327a4445b56a2f5d6.

* Simplify per @zeke

* Add homepage language redirect tests

* Update middleware/redirects/handle-redirects.js

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

* braces are good

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-08-05 21:46:57 +00:00
Grace Park
2dbea3737a Removing algolia (#20633) 2021-08-05 13:10:51 -04:00
Kevin Heis
b29e37318a Remove import x statements (#20594)
* Clear out most import x

* Update rimraf use

* Move up readme blocks in scripts
2021-07-29 20:28:30 +00:00
Kevin Heis
1ed18e1448 Clear out some non-fn references to Algolia (#20592)
* Clear out some non-fn references to Algolia

* Update .github/workflows/dry-run-sync-search-indices.yml

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

* Update contributing/search.md

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

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-07-29 20:20:55 +00:00
James M. Greene
2979dd66df Add some path blockers for malicious requests (#20577)
* Add some path blockers for malicious requests

Closes https://github.com/github/docs-engineering/issues/759

* Reorder checks and respond with 404 in one case
2021-07-29 15:57:34 +00:00
Mike Surowiec
9386571aa4 fix: use named export for all-versions (#20478)
* fix: use named export for all-versions

* run prettier
2021-07-22 19:29:00 +00:00
Grace Park
44f451eb09 Removing webpack build step (#20405)
* removing webpack build step

* keep copywebpackplugin and add fonts to assets/fonts

* update marketing font path

* update font path

* update font

* remove builtAssets

* remove copying front end code with dist

* move Inter fonts to /assets/fonts/inter

* move copy-webpack-plugin back to deps

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2021-07-22 09:11:30 -07:00
James M. Greene
df301cb5da Remove all code related to Redis page caching (#20457)
Towards simplification for https://github.com/github/docs-engineering/issues/678
2021-07-21 20:44:00 +00:00
Mike Surowiec
df38087aed Update 404/500 pages to no longer use liquid templates (#20450)
* Update 404/500 page rendering to no longer use liquid templates

* updating tests

* remove unused path

Co-authored-by: Grace Park <gracepark@github.com>
2021-07-21 12:22:30 -07:00
Mike Surowiec
6bc50f7e30 fix: filter hidden pages from the currentProductTree (SidebarProduct) (#20404)
* fix some async test things

* allow eslint to parse top-level awaits

* fix: filter out hidden pages closer to SidebarProduct usage
2021-07-20 12:32:35 -04:00
Robert Sese
1d39dcedb4 Show errors on staging as well (#20393) 2021-07-19 15:47:59 +00:00
Grace Park
27aa5d92ea Remove FEATURE_NEXTJS Flag Part 1 (#20176)
* cleanup FEATURE_NEXTJS

* fixing some server tests

* updating article a for server tests

* update h2 to h4 map topic tests

* data off on TOCs

* updating dropdown article versions links

* Update so markdown renders in intros

* updating typo and all server tests are now passing

* remove nextjs feature flag

* head.js tests pass

* updating article-version-picker

* remove nextjs feature flag browser test

* update header.js tests

* fix page-titles.js test

* fix deprecated-enterprise versions

* adding early access

* testing

* getting childTocItem

* fixing table of contents to show child toc items

* updated to 2 because the sidebar article also has the same link

* remove comment

* updating pick

* Update TocLandingContext.tsx

* update package.json and change className to h4 for h2

* updating with mikes feedback

* remove a.active test

* React clean up: Delete unnecessary layouts/includes Part 2 (#20143)

* Delete unnecessary layouts

* setting back tests failing :(

* update layouts

* delete unnecessary includes

* remove github-ae-release-notes and updating layouts

* remove a.active test
2021-07-16 14:54:25 -07:00
Kevin Heis
8a56437c93 Pretty format (#20352)
* Update prettier flow to include JS

* Run prettier

* ...run prettier
2021-07-14 14:35:01 -07:00
Kevin Heis
42e785b0a8 Migrate CommonJS to ESM (#20301)
* First run of script

* Get the app running --- ish

* Get NextJS working

* Remove `node:`

* Get more tests passing in unit directory

* Update FailBot test to use nock

* Update test.yml

* Update Dockerfile

* tests/content fixes

* Update page.js

* Update build-changelog.js

* updating tests/routing

* Update orphan-tests.js

* updating tests/rendering

* Update .eslintrc.js

* Update .eslintrc.js

* Install jest/globals

* "linting" tests

* staging update to server.mjs

* Change '.github/allowed-actions.js' to a ESM export

* Lint

* Fixes for the main package.json

* Move Jest to be last in the npm test command so we can pass args

* Just use 'npm run lint' in the npm test command

* update algolia label script

* update openapi script

* update require on openapi

* Update enterprise-algolia-label.js

* forgot JSON.parse

* Update lunr-search-index.js

* Always explicitly include process.cwd() for JSON file reads pathed from project root

* update graphql/update-files.js script

* Update other npm scripts using jest to pass ESM NODE_OPTIONS

* Update check-for-enterprise-issues-by-label.js for ESM

* Update create-enterprise-issue.js for ESM

* Import jest global for browser tests

* Convert 'script/deploy' to ESM

Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: James M. Greene <jamesmgreene@github.com>
2021-07-14 13:49:18 -07:00
Sarah Schneider
6fb35aae8d Fix local dev TOC (#20253)
* refactor dev-toc middleware to use new site tree

* refactor dev-toc layout to use new site tree (we can move this to React someday if we want)
2021-07-01 10:05:18 -05:00
Sarah Schneider
a344b8f078 hide early access product TOC links 2021-06-29 19:27:54 -04:00
James M. Greene
2dbae93c53 Try to prevent late/duplicate response errors (#20077)
* Ensure all Express 'next' calls include 'return's

* Add headersSent checks during archived versions flow

* Return a 404 earlier if archived resource fetch fails

* Short-circuit responses for archived stuff

* Be more careful about responding to and short-circuiting after search requests

* Fix tests
2021-06-28 19:31:54 +00:00
Sarah Schneider
cffafaf748 Merge branch 'main' into revert-20087-revert-20069-fix-homepage-versions-dropdown 2021-06-24 12:40:17 -04:00
Kevin Heis
d3403e8653 Address goofy exports (#20113)
* Address a goofy export

* Fix more exports

* Change two exports
2021-06-24 14:59:06 +00:00
Sarah Schneider
3b78be7ff0 Merge branch 'main' into revert-20087-revert-20069-fix-homepage-versions-dropdown 2021-06-23 18:55:17 -04:00
Kevin Heis
a92d820888 Remove remaining JSON requires (#20110)
* Remove remaining JSON requires

* Lint

* Update feature-flags.js
2021-06-23 14:57:50 -07:00
Sarah Schneider
7e3e75616c Merge branch 'main' of github.com:github/docs-internal into feature-versioning 2021-06-23 15:59:37 -04:00
Sarah Schneider
d454e4032e Merge branch 'main' of github.com:github/docs-internal into feature-versioning 2021-06-23 15:16:52 -04:00
Grace Park
cbdd722cac Merge branch 'main' into dynamic-esm 2021-06-23 10:46:25 -07:00
Sarah Schneider
15e33f05e7 Revert "Revert "Fix homepage versions dropdown" (#20087)"
This reverts commit f9f0b2ce86.
2021-06-23 10:12:36 -04:00
Matt Pollard
f9f0b2ce86 Revert "Fix homepage versions dropdown" (#20087) 2021-06-23 09:11:51 +02:00
James M. Greene
7ee7a1aaaa Merge branch 'main' into feature-versioning 2021-06-22 15:28:34 -05:00
Grace Park
bcb11e607e Merge branch 'main' into dynamic-esm 2021-06-22 12:55:26 -07:00
Sarah Schneider
9839afa806 this block is no longer used (unrelated to the homepage changes) 2021-06-22 15:15:30 -04:00
Grace Park
23f586bb93 merge and fix conflicts 2021-06-22 11:41:10 -07:00
Mike Surowiec
b24fe62965 always render with nextjs when FF is true (#20067)
* always render with nextjs when FF is true

* remove path-to-regexp from package.json
2021-06-22 11:29:51 -07:00
Grace Park
d3d1902414 Merge pull request #20017 from github/upgrade-esm
Enforce and Move to Top Level require
2021-06-22 11:27:48 -07:00
Mike Surowiec
a24d01f78a Fix NextJS 500s (#20048)
* feat: allow server to contextualize request when on a /_next/data path

* add client side routing test, run lint

* enable nextjs client side routing
2021-06-22 17:30:40 +00:00
Sarah Schneider
1188fa557e Merge branch 'main' into feature-versioning 2021-06-22 11:07:27 -04:00
Sarah Schneider
04b6c07c8e Merge branch 'main' of github.com:github/docs-internal into feature-versioning 2021-06-22 10:26:02 -04:00
Sarah Schneider
c34e3e06e8 Merge branch 'main' into fix-early-access-tocs 2021-06-22 10:05:52 -04:00
Grace Park
ee58981b6a Merge branch 'main' into dynamic-esm 2021-06-21 13:35:30 -07:00
Mike Surowiec
b084dbc23d React: Enable all remaining pages (#20012)
* enable all remaining pages

* update tests for survey, filter card dropdowns

* fix search test

* fix: mobile search layout

* update sidebar test

* fix: learning track page is optional

* fix broken links
2021-06-21 19:52:58 +00:00
Sarah Schneider
b13ac1bd85 only hide TOC items on non-early access content; we want it to display on EA pages 2021-06-21 14:40:38 -04:00
Grace Park
9401a8f13a Merge branch 'main' into upgrade-esm 2021-06-18 13:13:53 -07:00
Grace Park
7f6a277a8e clear out dynamic require 2021-06-18 13:08:28 -07:00
Grace Park
b688ac036c update instrument middleware 2021-06-18 12:14:08 -07:00
Mike Surowiec
5991ffb1af Enable more react sub-sections (#20004) 2021-06-18 08:30:32 -07:00