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

93 Commits

Author SHA1 Message Date
Kevin Heis
2d15c92e84 Move a few more files into events src (#36574) 2023-05-08 15:33:13 +00:00
Peter Bengtsson
9df19f4581 Fall back to English if translation title is empty string (#35702) 2023-03-20 21:19:51 +00:00
Peter Bengtsson
93b01e7a56 don't render the shortTitle inside Page.render (#33922) 2023-01-12 17:54:31 +00:00
Peter Bengtsson
1a32b39f78 don't htmlencode 'title' (#33920) 2023-01-12 16:57:34 +00:00
Peter Bengtsson
65b581fe53 don't set context.relativePath in Page.render (#33288) 2022-12-07 19:58:33 +00:00
Peter Bengtsson
1126f7d349 don't html encode this.shortTitle (#33287) 2022-12-06 21:22:56 +00:00
Peter Bengtsson
8a6e6f063f fall back to English on page.render liquid errors (#32799) 2022-12-06 17:11:41 +00:00
Peter Bengtsson
00b7ba1a6b only load site tree from English and "translate" the others (#32761) 2022-11-21 12:37:48 +00:00
Peter Bengtsson
6d88215b46 fall back to English on corrupt content files (#32629) 2022-11-17 19:11:29 +00:00
Peter Bengtsson
97cc0eb572 only render product_video when needed (#32048) 2022-10-25 20:05:50 +00:00
Nick McCurdy
d6a886b6d0 Rename github-community to community 2022-07-27 17:36:23 -04:00
Courtney Wilson
be95e8e56d Merge branch 'main' into fix-links-to-feedback-discussions 2022-07-26 15:56:10 -04:00
Nick McCurdy
a56fde7040 Fix links to feedback discussions 2022-06-30 01:26:59 -04:00
Nick McCurdy
0f8139c12d Update feedback repository URL 2022-06-30 00:40:34 -04:00
Sarah Schneider
10b7d41e36 fix conflicts 2022-06-24 09:21:18 -04:00
Hector Alfaro
4b27213cc6 Merge branch 'main' into hectorsector/consolidate-tool-picker 2022-05-24 11:01:46 -04:00
Hector Alfaro
91778790d8 clean up and comment tool picker stuff 2022-05-24 10:40:46 -04:00
Hector Alfaro
3b825a46d2 pull out tools from page.js and ToolPicker component 2022-05-23 10:48:49 -04:00
Sarah Schneider
07178ec1fb Merge branch 'main' of github.com:github/docs-internal into versioned-redirects 2022-05-23 09:04:46 -04:00
Peter Bengtsson
18504871b9 cache full rendering (#25424)
* cache full rendering

* still not working with gzip

* progress progress progress

* smaller

* hacky progress

* small fixes

* wip

* lock file

* wip

* wip

* package-lock updates

* wip

* search DOM in lowercase

* simplify

* with instrument

* improve test coverage

* mutateCheeriobodyByRequest

* fix

* remove renderContentCacheByContex

* disable render caching in sync-search

* diables things in github/github link checker

* gzip lru

* tidying up

* updated

* correct tests

* fix: move userLanguage to LanguagesContext

* Revert "fix: move userLanguage to LanguagesContext"

This reverts commit d7c05d958c71eaad496eb46764eb845d80b866ca.

* contexts ftw

* fixed rendering tests

* oops for got new file

* nits addressed

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2022-05-23 12:12:09 +00:00
Sarah Schneider
e101c95817 run generateRedirectsForPermalinks whether the content file has redirects or not 2022-04-27 17:59:00 -04:00
Robert Sese
33c05d81ce Change product landing page introLinks to a general map of link titles to links (#26360)
* Add cta button to frontmatter and context

* Add cta to Page

* Render cta button in product landing hero

* Handle external links

* Add simple unit test for cta link

* Address feedback

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

* Actually push condition update

* Show it's an external link

* Refactor FullLink so we use Link once

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

* Custom link can also be null

* Rename 'cta' to 'custom' and make it the last introLink

* Update tests with 'cta' to 'custom' change

* Filter once

* Revert "Filter once"

This reverts commit a3f9a8a06b505d77fed47ca96a66c187c86c3c91.

* Update introLinks to a map of titles and URLs

* No more custom introLink in LandingHero

* Simplify introLinks processing

* introLinks can also be null

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

* more concise

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

* No longer necessary with the a plain introLinks map

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

* '.entries()` is simpler

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

* 'link' could be false depending on what version you're on

* Update test for new introLinks

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-04-01 11:01:37 -05:00
Martin Lopes
53a274d3c2 Added tool picker options for powershell and bash 2022-03-03 15:35:41 +10:00
Peter Bengtsson
465e7d6689 Look up on productMap keys as a set (#25590) 2022-02-24 13:38:08 +00:00
Peter Bengtsson
16113fd23a don't check the productMap for translations (#25589)
* don't check the productMap for translations

* fix breaking test
2022-02-24 13:05:35 +00:00
Peter Bengtsson
96701946ae delete .frontmatterErrors after it has been used (#25389) 2022-02-22 21:03:14 +00:00
Peter Bengtsson
07c8fc3c2a Decouple redirects from language (#24597)
* experimenting with redirects

* cleanup developer.json

* wip

* clean console.log

* progress

* some progress

* progress

* much progress

* debugging tests

* hacky progress

* ditch latest -> number redirects

* minor

* hacky progress

* lots of progress

* some small fixes

* fix rendering tests

* small fixes

* progress

* undo debugging

* better

* routing tests OK

* more cleaning

* unit tests

* undoing lineending edit

* undoing temporary debugging

* don't ever set this.redirects on Page

* cope with archived version redirects

* adding code comments on the major if statements

* address all feedback

* update README about redirects

* delete invalid test

* fix feedback
2022-02-14 20:19:10 +00:00
Peter Bengtsson
cc44b2725e an empty 'product', 'permissions', or 'learningTracks' gets stuck (#25070)
* and empty 'this.product' gets stuck

* add test to prove change
2022-02-07 16:08:51 +00:00
Peter Bengtsson
cc79340595 cache individual renderContent instead of page.render (#24955)
* cache individual renderContent() instead of page.render()

* remove commented code

* unbreak unit tests
2022-02-03 16:56:05 +00:00
Laura Coursen
4ede312204 Add early access docs for GEI-CLI (#24592) 2022-02-02 14:25:05 -06:00
Peter Bengtsson
75a85da692 insight into which page has what page.render statsd timer (#23747) 2021-12-15 20:12:26 +00:00
Peter Bengtsson
8e1508d5fd remove crowdin-support hack (#23231) 2021-12-01 22:56:03 +00:00
Kevin Heis
e3b2e820fd React tool picker (#23004)
* Working on tool picker

* Start on react version of tool picker

* Update ToolPicker.tsx

* Update tool-switcher.html

* Get it working

* Update browser.js

* Update browser.js

* Update ToolPicker.tsx
2021-11-29 23:04:06 +00:00
Mike Surowiec
9952744db2 fix: certain articles not correctly identified as having platform specific content (#22887) 2021-11-16 22:39:09 +00:00
Mike Surowiec
7310fc998a Refactor display-platform-specific-content (#22665)
* refactor display-platform-specific-content

* update PlatformPicker tests and cleanup
2021-11-12 14:40:35 +00:00
Laura Coursen
8f964ea2cb GHEC version (#20947)
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com>
Co-authored-by: Robert Sese <sese@github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-10-15 15:41:33 -05:00
Grace Park
4727433baa Community redirect update to camel case and adding documentation (#21979)
* update to camel case

* add documentation on communityRedirect
2021-10-07 15:02:58 -07:00
Grace Park
9dd8ed7398 Bring back community redirect (#21971)
* add back

* adding community_redirect to page context based on parent

* update to use parentProduct

* bring back the link-secondary and text-bold
2021-10-07 18:58:31 +00:00
Rachael Sewell
c7ac98304a allow use of full titles on landing page (#20327) 2021-08-25 12:31:16 -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
66a1dc493c support short versions in frontmatter 2021-06-14 19:51:38 -04:00
Mike Surowiec
37499b80d2 Reactify article page rendering (#19679)
* feat: reactify article page rendering

* feat: add LearningTrackNav

* fix: use plain text title for article
2021-06-07 22:56:33 +00:00
Mike Surowiec
37f73f0bb3 Heroku dev deps (#19431)
* fix: req.csrfToken doesn't always exist (e.g. 500 page)

* feat: update dockerfile and add nextjs to build

* fix: run linter

* move @babel deps -> dev deps

* move webpack looking things from deps -> dev deps

* move pa11y-ci to optional dep

* explicitly include optional deps for pa11y

* allow heroku dev deps to be installed

* fix: update postcss module

* fix: update dockerfile build

* tmp: disable renderReact

* see if another deploy is slower/faster

* move a few more packages to devDeps

* upgrade to package-lock v2

* use dayjs instead of date-fns

* move cross-env to devDeps

* remove unused 'del' package

* commit husky precommit hooks

* add hrtime to clone-for-build.js

* Revert "add hrtime to clone-for-build.js"

This reverts commit 70ee647bacce833f4ed2f621f62c63c1d85e5413.

* update babel/eslint

* fix: remove unused plugin

* try a .slugignore

* fix: heroku-postbuild to use npm run build

* fix: i cannot spell dereferenced

* add .next/cache to heroku cacheDirectories

* test cached build

* remove aws-sdk, see what breaks

* move jest-puppeteer to optional deps

* fix: update browser-test.yml to use newer node version

* move jimp to optional dependencies

* move puppeteer to optional dependencies

* fix: ci optional include

* fix: bad copy pasta

* remove previous react experiment

* update tests/README.md with note about optional deps

* bump node test version back to 14

* convert package-lock back to v1

* fix: use node 15.x to leverage npm optional deps

* fix: optional dep install

* test: see what happens with heroku/nodejs-typescript buildpack

* back to heroku/nodejs buildpack

* move jest to optional

* revert jest move

* remove .slugignore

* cleanup dockerfile, move xlsx-population to optional, add comment about optional deps

* Update Dockerfile

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

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-05-24 15:40:50 -07:00
Sarah Schneider
5978edb47b remove feature flagged code 2021-05-20 10:01:33 -04:00
Kevin Heis
54887bc66b Sort topics on guide page (#19404) 2021-05-19 17:52:56 +00:00
Sarah Schneider
802cb67013 move the learning tracks processing into a separate module and return featured link in addition to learning tracks 2021-04-27 17:14:14 -04:00
Sarah Schneider
cccccf0e00 introduce a document-type helper 2021-04-15 14:16:47 -04:00
Sarah Schneider
c7f647f68a update references 2021-04-01 15:29:59 -04:00
Sarah Schneider
ee53f96dad support conditionals in sublanding FM props 2021-04-01 10:01:23 -04:00