1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Commit Graph

101 Commits

Author SHA1 Message Date
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
Sarah Schneider
b320016ea5 parse some of the landing page frontmatter so we can respect conditionals 2021-03-26 11:24:29 -04:00
Jason Etcovitch
7e3229e39a Fix translated glossary links (#17734)
* npm start should be ja

* Add special handling for glossary headings

* Don't sort glossary

* Use English slug to maintain anchor, re-add sort
2021-02-12 19:23:40 +00:00
Jason Etcovitch
53d8e60959 Add a test for non-English rendering (#17593)
* Throw in some code that should fail a test

* Remove read-frontmatter behavior

* Unskip the test that would catch this

* Remove the throw to pass the test
2021-02-02 18:14:39 +00:00
Jason Etcovitch
bd63f47636 Remove cheerio from Page#render (#17566)
* Write our plugin

* Include it

* Move the RegEx

* Don't rewriteLocalLinks with cheerio anymore

* Process after HTML ast is generated

* Use the same logic as before, just to see if it'll pass

* Don't require languageCode/version

* Only work on local links

* Needs an href

* Only update href if there's a new one to use

* Check for node.properties

* Some links are just mean

* Move use-english-headings to be a plugin

* Bail if no englishHeadings were passed

* Install rehype-wrap

* Wrap ol > li img in div.procedural-image-wrapper

* Test for platform without cheerio

* Use a plugin for rewriteAssetPathsToS3

* Remove cheerio from page.render

* Fix require paths

* SImplify

* Fix some 🐛s

* Use our own rehype-wrap

* Move rewriteAssetPathsToS3 after HTML AST

* Remove some console logs

* Fix check for includesPlatformSpecificContent

* Rename ast => tree
2021-01-29 15:44:50 -05:00
Jason Etcovitch
989006bab5 Move the rewriteLocalLinks behavior to an AST pipeline plugin (#17550)
* Write our plugin

* Include it

* Move the RegEx

* Don't rewriteLocalLinks with cheerio anymore

* Process after HTML ast is generated

* Use the same logic as before, just to see if it'll pass

* Don't require languageCode/version

* Only work on local links

* Needs an href

* Only update href if there's a new one to use

* Check for node.properties

* Some links are just mean
2021-01-29 15:36:17 +00:00
Vanessa Yuen
4038e9ca85 Add topic property and filter to guides page (#17328)
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
2021-01-29 12:32:31 +00: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
Vanessa Yuen
b46da8dfc7 Sublanding page all guides section (#16869)
* get link liquid tag to accept variables as param

* new liquid tag `link_as_article_card`

* refactor link liquid tag slightly so we can control what props get rendered

* generalize filterCodeExample to use in all guides section

* pass in `js-filter-card-max` instead of hardcode max

* tweaks and add `data` to CSP for images

* add liquid tag tests

* add some browser tests for card filters

* we still need to rely on `getPathWithLanguage` for hrefs that already have the language code embedded


Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
2021-01-18 12:23:23 +00:00
Jason Etcovitch
0ec47e0246 Only read the frontmatter from files in warm-server (#17222)
* Add read-frontmatter.js

* Use it

* Page static read/init are async now

* Fix some blockers

* I'm confused

* Fix some more bugs

* Use frontmatter schema, ensure end fence exists

* Fix a bug

* Still read full contents for index.md files

* Remove comment

* Only get ToC items for index pages

* Readd frontmatter error and verdadero handling

* Fix some borked tests

* Simplify the code

* Add a comment

* Remove redundant variable

* Re-simplify the Page construction

* End chunk _after_ endline

* Just use Page.init
2021-01-14 10:46:59 -05:00
Vanessa Yuen
641ed02e81 Actions Guides sublanding page (#16740)
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
Co-authored-by: Cynthia Rich <crichID@github.com>
2021-01-11 18:30:57 +01:00
Kevin Heis
3582de03da Parentheticals -> parentheses (#17130) 2021-01-05 17:04:01 +00:00
Kevin Heis
4e781a553c Fix some typos in the lib directory (#17131)
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
2021-01-05 15:53:05 +00:00
Chiedo John
4654635962 Merge branch 'main' into default-platform 2020-12-18 10:45:26 -05:00
Kevin Heis
59f375ab1d Merge branch 'main' into default-platform 2020-12-16 14:36:46 -08:00
Kevin Heis
1cf2a16d21 Merge branch 'main' into revert-16952-revert-16947-optimize-sitetree 2020-12-15 14:05:49 -08:00
Kevin Heis
0f685115f7 Revert file reads from async to sync (#16979)
* Revert file reads from async to sync

* Async funness

* Fix warm server timers

Co-authored-by: Chiedo John <chiedo@chiedosbmacbook.lan>
2020-12-15 22:04:41 +00:00
Kevin Heis
3dae194793 Merge branch 'main' into revert-16952-revert-16947-optimize-sitetree 2020-12-15 11:01:37 -08:00
Kevin Heis
85ddb82fe8 Avoid mixing sync and async during warmServer (#16940)
* Avoid mixing sync and async during warmServer

* Update data-directory.js

* Move more sync processing to later

* Update pages.js

* Update pages.js
2020-12-15 10:56:25 -08:00
Kevin Heis
122da9610c Move redirect calculation from loadPages to loadRedirects (#16918)
* Move redirect calculation from loadPages to loadRedirects

* Make buildredirects a method for tests

* Update redirects.js

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
2020-12-15 18:40:50 +00:00
Sarah Schneider
c859f853dc refactor map topic module to not use breadcrumbs 2020-12-15 11:52:53 -05:00
Sarah Schneider
dca55a0257 Revert "Revert "sitetree optimizations"" 2020-12-14 20:25:01 -05:00
Sarah Schneider
b38eec9964 Revert "sitetree optimizations" 2020-12-14 16:53:04 -05:00
Sarah Schneider
ab7cbda68d refactor how we get map topic content 2020-12-14 14:55:16 -05:00
Kevin Heis
7dfea2d0d6 Remove stat check from lib/pages per Node recommendations (#16920) 2020-12-14 16:44:09 +00:00
Simran Spiller
3f8f75e116 YAGNI: Remove support for {% all %} 2020-12-11 01:05:23 +01:00
Kevin Heis
62889986b6 Revert "Revert "Speed up warmServer by loading pages (and files) asyn… (#16837)
* Revert "Revert "Speed up warmServer by loading pages (and files) asynchronously (#16752)" (#16835)"

This reverts commit a14517115f.

* Move async to regular dependencies

* Update package-lock.json
2020-12-09 17:40:58 +00:00
Jason Etcovitch
a14517115f Revert "Speed up warmServer by loading pages (and files) asynchronously (#16752)" (#16835)
This reverts commit 1d5e216404.
2020-12-09 17:12:07 +00:00
Kevin Heis
1d5e216404 Speed up warmServer by loading pages (and files) asynchronously (#16752)
* Async `new Page`

* Update pages.js

* Update pages.js

* Update pages.js

* Update pages.js

* Update pages.js

* Using mapLimit

* Update pages.js

* Test updates

* Update pages.js

* Move exists to page class

* Test fixes

* Slightly faster localized paths process
2020-12-09 16:57:18 +00:00
Octomerger Bot
218d08f38d Branch was updated using the 'autoupdate branch' Actions workflow. 2020-12-03 12:53:19 -08:00
Kevin Heis
92ba8d904e Merge branch 'main' into experiment-with-react-and-mdx 2020-12-03 08:49:34 -08:00
Kevin Heis
11d8e415da Check repository references (#16680)
* Check repository references

* Remove "foundRepoNames" that I used to find all the unique names

* A little speed up with Set

* Ignore a few files

* Remove remaining references

* Update README.md
2020-12-03 16:41:03 +00:00
Kevin Heis
791c7c6296 Run lint 2020-12-02 14:15:18 -08:00
Kevin Heis
07a78222ae Merge branch 'main' into experiment-with-react-and-mdx 2020-12-02 14:10:51 -08:00
James M. Greene
4e1d62b91a Remove free-pro-team support from Spanish translation of Insights doc (#16730)
* Remove free-pro-team support from Spanish translation of Insights doc

* Throw errors for mismatched products in non-English content pages as well
2020-12-02 22:07:56 +00:00
Jason Etcovitch
52dbd92144 Rewrite links in Page.intro with language (#16550)
* Add defaultLanguage behavior

* Add a million logs because I'm confused

* Rewrite intro links

* Undo changes to detect-language

* Add a test
2020-11-19 15:53:35 -05:00
Jason Etcovitch
0730158918 Datadoge (#16464)
* Install hot-shots

* Add statsd client

* Add some metrics

* Add a comment

* Comment typo fix

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

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2020-11-13 15:49:50 -05:00
Jason Etcovitch
174d8539c6 Support arbitrary keys in new featuredLinks frontmatter (#16239)
* Add featuredLinks to frontmatter

* Parse them in featured-links.js

* Remove old raw setup

* Use them

* Missed a couple

* Update translation files

* Fix frontmatter schema

* Loop over the right object

* Also update translations' usage

* Update docs and tests

* Better README comment

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

* Return next()

Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
2020-10-27 13:53:10 -04:00
Sarah Schneider
095410dcb0 Throw error on mismatched versioning (#16191)
* throw an error if a page is available in a version that its parent product is not available in

* add tests

* fix one Insights content file versioned for FPT when Insights is only available in GHES currently
2020-10-23 11:13:05 -04:00
Chiedo
3c71bc71ed Minor patches 2020-10-20 09:06:43 -04:00
Chiedo
8ef2822b48 Add performance optimization 2020-10-20 09:00:22 -04:00
Chiedo
b781e43893 Add experimental react support within markdown
Also added fronmatter for interactive: true to turn on React on a file by file
basis and prevent slowing down the builds for non-react files
2020-10-18 14:44:34 -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