1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Commit Graph

50 Commits

Author SHA1 Message Date
Peter Bengtsson
fa77a12bca Don't render Liquid if invalid lang & version combo (#39367) 2023-07-20 14:57:40 +00:00
Peter Bengtsson
2ec905fc77 trailingCommas:all on prettier (#38888) 2023-07-11 11:44:52 +00:00
Peter Bengtsson
567b77012a Homepage links (#37432) 2023-06-05 21:03:08 +00:00
Kevin Heis
68e29e17f6 Move search files to src (#35822)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2023-04-03 17:14:26 +00:00
Felicity Chapman
03a971c25a Create function to allow a reusable to link current article in a different docs version (#34273)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2023-02-02 09:30:34 +00:00
Peter Bengtsson
ce97d5d01e turn AUTOTITLE to actual titles (#33902) 2023-01-25 14:58:59 +00:00
Peter Bengtsson
8a6e6f063f fall back to English on page.render liquid errors (#32799) 2022-12-06 17:11:41 +00:00
Grace Park
e3f8f71c42 Rest api versioning redo (#33011)
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Sarah Edwards <skedwards88@github.com>
Co-authored-by: Grace Park <gracepark@Graces-MacBook-Pro-2.local>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
2022-11-28 11:55:02 -08:00
Peter Bengtsson
988e68fa98 JIT data (#32140) 2022-11-17 13:08:49 +00:00
Peter Bengtsson
d3fe424810 only include productGroups in main context on homepage (#31640) 2022-10-17 20:27:19 +00:00
Sarah Schneider
6c51c13392 Support deep links on homepage (#31172)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-10-12 12:58:46 +00:00
Kevin Heis
c8ae2081b7 Remove feature flags (#29968) 2022-08-16 11:23:02 +00:00
Kevin Heis
3cb36aa99f Remove airgap mode (#29964) 2022-08-15 21:05:21 +00:00
Peter Bengtsson
896439c3c3 unbreak thinking the site's in AIRGAP mode (#24863) 2022-02-01 14:30:14 +00:00
Peter Bengtsson
5d5e280f57 faster contextualize() by doing things once (#23526) 2021-12-09 16:04:56 +00:00
Peter Bengtsson
600808702c remove the 'expose' context variable (#23527) 2021-12-09 15:56: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
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
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
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
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
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
Sarah Schneider
9839afa806 this block is no longer used (unrelated to the homepage changes) 2021-06-22 15:15:30 -04: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
Kevin Heis
ef48759cb0 React: remove expose (#19771)
* React: remove expose

* Update context.js

* More changes

* fix: scripts check for IS_NEXTJS_PAGE so there's no timing issue

* run lint

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2021-06-10 16:53:43 +00:00
Grace Park
4857490339 Adding user language redirect notice 2021-05-22 14:52:48 -07:00
Sarah Schneider
5978edb47b remove feature flagged code 2021-05-20 10:01:33 -04:00
Sarah Schneider
28949233b9 add TODO comment for future cleanup 2021-04-27 17:15:25 -04:00
Sarah Schneider
81a4b5efcb Merge branch 'main' into update-new-site-tree-deps 2021-04-22 16:12:13 -04:00
jmarlena
1fc4c3f68b Article restructuring for Sponsors landing page (#18772)
* Move article from github directory as a top-level product

* Update article titles

* Remove old -ing article titles

* Use older format for this PR

* Finish updating links for retitled articles

* Remove sponsors topic

* Add sponsors to index.md

* Create folder for map topic for sponsors

* Add integrating folder/category with super basic graphql article

* Add get started category/folder

* Update index.md

* Add articles to category folders and update all the links and check it out locally 🙏

* Fix space

* Fix set of broken links

* Update link in resuable

* Add the quickstart

* Add USD

* Add matching donations caveat

* fix ci failures

* Bringing back `-ing` to Sponsors titles, categories, & links (#18817)

* Bringing back -ing

* The one that got away

* Apply @ethanpalm's input

Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>

Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>

* Apply product input

* Apply suggestions from code review

Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>

* Apply @emilyistoofunky's input

* Sponsors landing page design (#18774)

* Add sponsors to index.md as a top-level product

* Revamp the GitHub Sponsors landing page with article links

* remove merge tags

* add community section

* add sponsor descriptions

* swap repo for user

* remove prefix tag

* lint

* remove topic fix landing page

* Tweak articles on landing page

* Drop "account"

* Add quickstart

* Bigger, brighter, and shorter intro

* Possibly too long of an intro?

* fix quickstart link

* add guides page

* fix error for mismatch between title and filename

* use link over guid

* remove HTML from layout file (aligns to #18811)

* use variable for section title

* Add intro

* Remove beta

* Apply suggestions from code review

Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>

* Apply suggestions from code review

* Integrate article changes and remove old TOC

* Fixing the commented out text to match other landing pages 👓

* Apply suggestions from code review

Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>

* Switch up order of sidebar categories

* Add new text to landing page button

* Add topics and types

* Add the underscore

* Add some more topics

* fix `type:`

* Fix topics

* plural ftw

* hide learning paths when not defined

* lint

* Add quickstart to guides page

* remove unused sidebar links

* hide subsection title when learning tracks are not present

* Apply @emilyistoofunky's topics input

* Remove duplicated topics

* Events ftw

* typo

* Remove obsolete topics for now

* add some temporary duplicate topics

* Resolve Linter error

Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>

Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
2021-04-21 11:48:19 -07: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
56f1cdd12b add example variables to context via product ID 2021-04-15 12:31:59 -04:00
Kevin Heis
f160594a09 Enable set AIRGAP cookie to view Lunr search results (#18648)
* Enable set `lunr` cookie to view Lunr search results

* Use AIRGAP instead of lunr for cookie name
2021-04-09 17:38:32 +00:00
Sarah Schneider
c7f647f68a update references 2021-04-01 15:29:59 -04:00
Emily Gould
052a540cdb Getting started category landing page (#17841)
* Start building out landing page in index file

* Add articles

* Add a couple more popular articles

* Tweak intro to cover more audiences

* Add TOC back with new organization

* Update content/github/getting-started-with-github/index.md

* Category as product guides section

* Update breadcrumbs.js

* Update server.js

* Update product-landing.html

* Remove TOC listing

* Revert removing TOC

* Update index.md

* Update index.md

* Update content/github/getting-started-with-github/index.md

* Apply suggestions from code review

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

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
2021-03-09 10:04:45 -06:00
Kevin Heis
a3ad549e39 Block a few more things in AIRGAP (#17657)
* Block a few more things in AIRGAP

* Update middleware/context.js

Co-authored-by: Vanessa Yuen <6842965+vanessayuenn@users.noreply.github.com>

* Update product-landing.html

Co-authored-by: Vanessa Yuen <6842965+vanessayuenn@users.noreply.github.com>
2021-02-09 23:07:23 +00:00
Kevin Heis
8b86fd8fef Reduce minified JS bundle size from 189kb to 73kb (#17552) 2021-01-28 22:12:04 +00:00
James M. Greene
9724f763f5 Implement discount fingerprinting without webpack (#17337) 2021-01-19 23:00:54 -06:00
James M. Greene
fb30a0766f Unravel pages (the array + map object) (#16708)
* Revise the 'pages' module to export two methods: 'loadPages' and 'loadPageMap'

Update all existing references to use 'loadPages' for now

* Remove explicit Promise resolutions on loadPage* methods

* Condense reduction method into its now-singular usage spot

* Opt for for-of instead of forEach

* Make require of pages in warm-server more explicit

* Be more explicit about find-page using a pageMap

* Be more explicit about find-page-in-version using a pageMap

* Be more explicit about site-tree using a pageMap

* Extract the map creation from loadPageMap

* Be more explicit about using a pageMap

* Update redirects precompile to take two arguments: pageList, pageMap

* Rename internal loadPages method to loadPageList

* Clarify pageMap is what is stored in context.pages

* Use loadPageMap in tests and stuff
2020-12-03 22:31:10 +00:00
James M. Greene
f410fd175c Mostly reverting github/docs-internal#15313 2020-11-09 13:07:04 -06:00
Sarah Schneider
a45c8549d6 activeProducts are neither wip nor hidden 2020-10-20 17:21:29 -04:00
Sarah Schneider
da60aa51e1 Support enterpriseServerVersions in Liquid statements (#16058)
* remove outdated and redundant context.enterpriseVersions and add new context.enterpriseServerVersions

* update references from context.enterpriseVersions -> context.enterpriseServerReleases

* add test

* also test oldest supported enterprise version in addition to the latest

* Script to update not-free-pro-team conditionals (#16060)

* script to update not-free-pro-team conditionals

* change string to regex so we can do replace all

* remove stray test.only

* Update middleware/context.js

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

* Update tests/unit/page.js

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

* Update tests/unit/page.js

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

* Update tests/fixtures/page-versioned-for-all-enterprise-releases.md

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

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2020-10-15 16:20:41 -04: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
Kevin Heis
c450d8d555 Send CSRF tokens over XHR (#15778)
* Send CSRF tokens over XHR

* Update events.js

* Update browser.js
2020-09-28 09:44:14 -07: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