1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Commit Graph

407 Commits

Author SHA1 Message Date
Rachael Sewell
bd7d82b550 fallback to English page when translation unavailable (#22638) 2021-11-05 09:43:47 -07:00
Kevin Heis
8fa63c31a2 Fix recording redirects (#22534)
* Update record-redirect.js

* Update record-redirect.js
2021-11-02 20:16:36 +00:00
Kevin Heis
d6d40a974e 500 on /en/enterprise-server@2.16/admin (#22532)
* 500 on /en/enterprise-server@2.16/admin

* Update release-notes.js
2021-11-02 18:24:32 +00:00
Robert Sese
a14787956c Only interested in current version's guides (#22535) 2021-11-02 12:04:04 -05:00
Kevin Heis
dca7e56c3d More hydro error info (#22533)
* Add more info to hydro failures

* Clean up

* Update hydro.js

* Move hydro names to event schema file

* Update hydro.js
2021-11-02 16:13:48 +00:00
Mike Surowiec
fd9c8af939 add more invalid paths for /_next/data (#22423) 2021-10-26 23:04:31 +00:00
Robert Sese
693e36bfdd Fix breadcrumbs when paths have partial match 🍞 (#22414)
* Add failing breadcrumb test for paths with partial match

* Handle overlapping paths when creating breadcrumbs
2021-10-26 21:24:54 +00:00
Mike Surowiec
e3074d998f fix: detect language error on /_next/data/ input (#22419) 2021-10-26 21:03:47 +00:00
Mike Surowiec
bede852dc4 fix: detect-language correctly handles root path, add unit tests (#22404) 2021-10-26 03:22:25 +00:00
Edward Thomson
0fee9aedcd Landing page: groups of features (#22313)
* homepage: reduce padding below search area

Bring as much useful content up "above the fold".

* homepage: add groups for the front page sections

Group the homepage links into sections that map to the GitHub features
page (`/features`) plus two groups that are bespoke to the docs ("Get
started" and "Developers").

* homepage: update group design

Group the feature list area using the design exploration work by
@arisacoba.  Remove the description.

* homepage: remove ungrouped items from main area

Remove ungrouped items (like the external links) from the main feature
area.  Users can still navigate to ungrouped items in the sidebar.

* fix tsc error, use Link component

* homepage: support empty icon in group

Don't assume that we have icons everywhere on the landing page groups.

* homepage: drop octocat/invertocat

Looks weird with the modern icons, looks bad in dark mode.  Drop them
for now.

* homepage: document the childGroups frontmatter property

* homepage: don't test that sidebar == main content

We're reducing the links on the homepage in the main content area, but
the sidebar should be the complete list of products.  Remove the tests
that ensure that the main content area has all the sidebar content.  But
keep the tests that ensure that the sidebar content has all the links in
the main content area.

* homepage: remove "GitHub" doc set

The "GitHub" doc set "will be removed soon as we keep moving more content
out of it, so let's not include it here to keep the page more
evergreen."

* homepage: don't test that `/github` is linked on the main page

We're removing the `/github` doc set, and it's now not in the main page
grouped links.  Remove the test that `/github` exists, now look for
`/get-started`.

* homepage: use octicons instead of images

The images from https://github.com/features will be updated 🔜 - in
the meantime, let's use octicons which are consistent and give visual
interest.

* homepage: use octicons from @primer/octicons-react

Using the react components adds `<svg>` elements instead of `<img>`
elements, which lets the element use the current fill color, supporting
both light and dark themes.

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
2021-10-22 17:58:16 +00:00
Grace Park
884556eb02 Adding effectiveDate frontmatter property (#22317)
* adding effectiveDate frontmatter property

* Update components/article/ArticlePage.tsx

Co-authored-by: Peter Bengtsson <peterbe@github.com>

* adding validation for correct date

* update to dateTime

* update to year month day

* update error date validation

* moving validation to getArticleContextFromRequest and moving id to div

* remove enteredDate

* Update content/README.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

Co-authored-by: Peter Bengtsson <peterbe@github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
2021-10-20 19:40:13 +00:00
Peter Bengtsson
4e4ca1d12d gg commit (#22323)
Part of #1061
2021-10-20 09:45:18 -04:00
Peter Bengtsson
1d72d4c87e use temporary redirect to inject locale prefix (#22239)
* use temporary redirect to inject locale prefix

Fixes #996

* fix routing tests
2021-10-18 20:09:20 +00:00
Peter Bengtsson
c712da8f5d be more conservative with spotting q= in URL (#21945)
* be more conservative with spotting q= in URL

Fixes https://github.com/github/docs-engineering/issues/951

* refactor check

* Update tests/routing/redirects.js

Co-authored-by: Rachael Sewell <rachmari@github.com>

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-10-18 12:04:45 +00:00
Robert Sese
000799df17 Handle learning track paths from a different product (#21776)
* Add trackProduct property

* Fall back to learning track product URL param

* Add product URL param to learning track banner

* Add product URL param to featured track links

* Fix typo :(

* Add product URL param to learning track

* Add multi-product learning track tests

* Re-enable tests with a Code Security learning track

* Re-enable more tests with Code Security learning tracks

* Add more multi-product testing

* Update components/sublanding/LearningTrack.tsx

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

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-09-30 21:17:02 +00:00
James M. Greene
9a9b418033 Remove '/playground*' route handling (#21821) 2021-09-30 10:06:38 -05:00
Robert Sese
328be1052d Handle Liquid conditionals in track paths (#21755) 2021-09-27 18:11:22 +00:00
Mike Surowiec
3a1533b415 Fix breadcrumbs on translated pages (#21715)
* update breadcrumbs to fallback to english pages, fixes issue where breadcrumbs didn't appear on some translated pages
2021-09-24 17:31:06 +00:00
Mike Surowiec
06f1d3de73 fix: detect language for _next/data requests (#21696) 2021-09-23 21:38:30 +00:00
Robert Sese
27eaff7caa Handle learning track URL redirects (#21613)
* Handle redirects for learning tracks

* Test for learning track URL redirects

* Test latest Enterprise version

Co-authored-by: Rachael Sewell <rachmari@github.com>

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-09-22 20:33:56 +00:00
Mike Surowiec
5eb5f7650c enable client-side routing by default (#21593)
* enable client-side routing by default

* add prefetchSrc 'self' to csp
2021-09-17 19:38:20 +00:00
Kevin Heis
9f7c20dae8 Upgrade Primer CSS to version 17, removing marketing styles (#20965)
* Package updates

* Fix up things that look broken

* Add to utils

* Lead now just sets font size, just use f3 where needed

* Update package-lock.json

* Update index.tsx

* Delete bump-link.scss

* Update trigger-error.js

* Update components/GenericError.tsx

Co-authored-by: Ash Guillaume <10384315+ashygee@users.noreply.github.com>

* Update ArticlePage.tsx

* Update ActionBar.tsx

* Changes from meeting

* Found a few more monos

* Fix from a merge conflict

* Missed a few f3s

* Update SubLandingHero.tsx

* Bye gradients

* Match up breadcrumbs

* Update SubLandingHero.tsx

* Update lists.scss

Co-authored-by: Ash Guillaume <10384315+ashygee@users.noreply.github.com>
2021-08-31 14:49:39 -07:00
Kevin Heis
d431e86dec Storybook lite (#21040)
* Remove storybook

* Update index.js

* Start a storybook outline

* Start a storybook outline

* Start showing errors

* Update storybook.tsx

* Typescript lint

* Name field

* Responsive

* Update storybook.tsx

* Update storybook.tsx

* Update storybook.tsx

* Add BumpLink to storybook

* Update storybook.tsx
2021-08-30 20:34:14 +00:00
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