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

96 Commits

Author SHA1 Message Date
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
039cb2270b revert a search test change (#21142) 2021-08-25 20:13:18 -07:00
Rachael Sewell
df16267a8f remove cached-index-names file and dry run sync used for Algolia (#21133) 2021-08-25 22:04:26 +00:00
Laura Coursen
60b0d95f0d Hide the GitHub Insights docs (#20414) 2021-08-25 18:36:35 +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
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
Mike Surowiec
a511c95c7f SCSS and Component cleanup (pt 1) (#20572)
* turn article.scss into a module + componentized

* Update Survey to use only component styles, add cancel button

* Update GenericError + 404 page to use only standard classes

* update LearningTrack to not use markdown-body

* remove / consolidate stylesheets

* cleanup Graphiql explorer page and scss

* Componentize Breadcrumb styles

* Componentize DeprecationBanner styles

* scope h2 a link style to markdown-body

* cleanup nav, organize page-header and page-footer components

* remove unused scroll-button.scss

* organize LanguagePicker and ProductPicker

* add declarations file

* remove featured-links.scss, update tests

* update list utility and toc test

* fix bad merge resolution

* update breadcrumbs test
2021-07-29 17:27:20 +00:00
Kevin Heis
0b1ff73a46 Update some readFileSync to await readFile with top level await (#20525)
* Update some readFileSync to await readFile with top level await

* More updates

* Update all-products.js

* Use 'lib/readfile-async.js' in runtime files for better performance

* Remove unnecessary use of 'for await...of' loops

* Revert to importing 'fs/promises'

Co-authored-by: James M. Greene <jamesmgreene@github.com>
2021-07-29 16:45:46 +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
Sarah Schneider
cc2d10d1b3 Rewrite Liquid deprecation script (#20225) 2021-07-19 22:36:15 +00: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
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
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
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
hubwriter
287a857511 Update Packages docs for Container registry GA (#19987)
* Update packages landing page

* Docs updates for Container reg GA

* Update billing note

* Delete CR feature preview files

* Fix broken link

* Remove github.ref from workflows

See https://github.com/github/docs-internal/pull/19953

* Put 3rd party action message in a reusable

* Update content/billing/managing-billing-for-github-packages/about-billing-for-github-packages.md

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Update content/packages/learn-github-packages/deleting-and-restoring-a-package.md

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Update content/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry.md

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Update content/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry.md

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Update content/packages/working-with-a-github-packages-registry/working-with-the-container-registry.md

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Update content/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions.md

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* fix bug with wbr breaking a link inside a code tag inside a table

* Make revisions suggested by Nilofer

See https://github.com/github/docs-internal/pull/19987/files#r655014673

* Mention that migration is happening gradually

* Reapply change suggested by Shayne

* Fix punctuation

* Remove bad link

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com>
2021-06-21 15:10:12 -04:00
Emily Gould
1e5372ac79 Move Getting started category to top-level doc set (#20008)
* Move category to top-level doc set

* Move doc set to the top and update short title

* Undo package-lock changes

* updated hardcoded refs in tests

* Update test

* Fix hardcoded link in test

Co-authored-by: Sarah Schneider <sarahs@github.com>
2021-06-18 17:13:04 +00:00
Mike Surowiec
5396f5f9e4 React: All landing pages (#19943)
* default all remaining landing pages to react, update tests
2021-06-17 10:04:53 -07:00
Grace Park
98b59087c5 updating category pages test 2021-06-15 16:24:54 -07:00
Grace Park
5dd156c726 pages test passes 2021-06-15 14:54:47 -07:00
Grace Park
1823cff641 updating pages to page-data 2021-06-15 11:02:05 -07:00
Sarah Schneider
313cbc8785 lint 2021-05-26 15:18:26 -04:00
Sarah Schneider
255864e210 remove a couple no longer relevant tests; these parts of the site tree do not need to be sorted 2021-05-21 12:47:48 -04:00
Sarah Schneider
8b6e5f30f7 no longer need the middleware in tests 2021-05-21 12:32:05 -04:00
Sarah Schneider
5978edb47b remove feature flagged code 2021-05-20 10:01:33 -04:00
Kevin Heis
f6acb1f08a Update dependencies (#19408)
* Update dependencies 2

* Lint fixes

* Update graphql packages

* Update changelog-entry.json

* Update @octokit/rest

* Update commander with help from @rachmari

@rachmari

* Upgrade helmet

* Upgrade js-yaml

* Update server.js

* Update cheerio

* Revert "Update cheerio"

This reverts commit 8aa17c39fbf564ee554037d89e7a473027d16984.
2021-05-19 17:32:47 +00:00
Sarah Schneider
e30292c0fd add feature flagged conditionals to tests 2021-05-18 20:44:46 -04:00
Amy Burns
c863678e73 New organization for codespaces docs (#18910)
* adding new tables and linking to info on audit logs

* editing some text:

* adding new info on how to add image registry login

* adding link and fixing table

* formatting

* formatting

* Apply suggestions from code review

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

* updaing private image registry secret info and other improvements

* some minor fixes

* fixing test errors

* rewriting registry secret section

* rewriting registry secret section

* updating link to reflect title

* Update content/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces.md

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

* updating bullet point

* moving codespaces to top-level item

* fixing duplicated redirect

* Adding some organization for contributors

* adding learning codespaces to index file

* do not error out if category array is empty

* Apply suggestions from code review

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

* fixing broken link

* Document choosing machine type for a codespace in the GitHub UI (#19055)

* Document choosing machine type in the GitHub UI

* Replace link placeholder with actual path

* Update content/codespaces/changing-the-machine-type-for-your-codespace.md

Co-authored-by: Amy Burns <timeyoutakeit@github.com>

Co-authored-by: Amy Burns <timeyoutakeit@github.com>

* reoganizing based on CD

* putting machine type doc in correct location

* fixing broken redirects

* removing quickstart example from index page

* updating main index file

* Fixing broken links

* adding intros

* adding js quickstart (#18960)

* adding js quickstart

* clarify walkthrough

* adding more images and last few sections

* fixing broken links

* fixing broken links and formatting

* formatting fixes

* Apply suggestions from code review

Co-authored-by: hubwriter <hubwriter@github.com>

* adding index file for learn folder

* adding some feedback changes

* adding some review comments

* fixing broken links

Co-authored-by: hubwriter <hubwriter@github.com>

* doing some additional re-org

* fixing topics

* adding Codespaces as a topic

* fixing so title matches slug

* Update data/reusables/codespaces/codespaces-machine-types.md

Co-authored-by: Meg Bird <megbird@github.com>

* expanding intro

Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: hubwriter <hubwriter@github.com>
Co-authored-by: Meg Bird <megbird@github.com>
2021-05-03 17:06:49 +00:00
jmarlena
e71021ae66 Packages content redesign (#18847)
* Add actions category name as first commit

* Package reorganization: rename articles for "Learning..." and "Managing..." categories (#18880)

* Initial prep work for Packages reorg

* Make changes for Learning and Managing categories

* Match file name to revised article title

* Rework packages guides (#18902)

* Create new directory

* Delete guides directory and index.md link

* Remove duplicated redirects to fix test

* fix folder name

* delete temporary directory of old content

* Add Gradle article

* Update landing page with new links

* Update test to fix CI failure for deleted articles

* Update links and titles for reorg-ed articles

* Fix broken links

Co-authored-by: hubwriter <hubwriter@github.com>

* Update more changed article titles in links (#18911)

* remove test line to test PR build failure

* Add sections to permissions article

* Add draft reusable

* restore versioning tests

* Remove accidental inclusion of new reusable from a different branch

* Package registry content redesign updates (#18930)

* Update container registry product variable

* First round of edits

* Update tidbit

* Apply suggestions from code review

Co-authored-by: hubwriter <hubwriter@github.com>

* Update docker-vs-container-registry.md

* Update authentication section to resolve bug/confusion

* Revisions

* Last touchups

* Migration from intro article

Co-authored-by: hubwriter <hubwriter@github.com>

* Add versioned diagrams

* Add packages actions revisions (#18956)

* Add refreshed content

* Update content/packages/managing-github-packages-using-github-actions-workflows/example-workflows-for-publishing-a-package.md

Due to tightness of time on this I'm going to commit this suggestion so that I can merge this PR into the Packages megabranch.

Co-authored-by: hubwriter <hubwriter@github.com>

* Packages reorg: "Introduction to GitHub Packages" article (#18906)

* Initial commit. Remove stray comma

* Initial CC work - WiP

* More changes for the Introduction article

* Make changes as per Jessica's review

* Fix broken reusable ref

* improve test failure message and add clarifying comments

* Packages reorganization: More updates to the 'Learn GitHub Packages' articles" (#18961)

* Viewing - WiP

* More updates to the 'Learn...' category

* revisions to intro article

* Add permissions article and make a few other streamlined updates

* Fix links 🌿

Co-authored-by: jmarlena <>

* Apply suggestions from code review

* Apply product input

* Fix versioning

* Apply some straight-forward suggested changes 

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

* Add "GitHub Packages" before container registry mention

* Standardize visibility & permsisions section into a reusable

* Add link

* Replace outdated link

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* ✂️ cut note

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Superseded rewrite?

* bye single-use reusable

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Condense packages & actions conceptual content

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* remove "package registries"

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Add reusable

* Add these redirects from the deleted containers conceptual article

* Incorporate changes from main into retitled articles 💫

* Missing endif

* Fix unexpected redirect behavior

* Revamp and consolidate actions access settings

* Further reading section

* Last fix for now

* standardize steps

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: hubwriter <hubwriter@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
Co-authored-by: jmarlena <>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
2021-04-30 16:28:27 -07:00
Sarah Schneider
f0d17c300d move lint-files to its own dir 2021-04-28 14:40:42 -04:00
Sarah Schneider
1e8baf292a Merge branch 'main' into add-ghes-releases-link-to-versions-dropdown 2021-04-27 20:13:53 -04:00
Sarah Schneider
facc2831c3 Update tests/content/lint-files.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-04-27 20:11:28 -04:00
Sarah Schneider
3cdc9af2c9 update refs again 2021-04-27 14:20:28 -04:00
Sarah Schneider
2054f3264c move schema files into lib/schemas and update references 2021-04-27 14:06:42 -04:00
Sarah Schneider
1ea595e12f skip the releases page in linter tests 2021-04-26 16:55:55 -04:00
Sarah Schneider
a0bdb5ea76 Crowdin merge helper scripts (#18684) 2021-04-14 18:49:15 +00:00
Sarah Schneider
62bb173ac6 use regex to be more forgiving in matching yaml, yml, etc. 2021-03-31 12:25:51 -04:00
Sarah Schneider
10b13a8ebd Merge branch 'main' of github.com:github/docs-internal into scheduled-workflow-tests 2021-03-31 09:14:31 -04:00
Vanessa Yuen
a8d54c9af7 Improvements in tools to help merge crowdin PRs (#18409)
- add `script/test-render-translation.js` to render all translated content to catch malformed liquid that would cause render errors
- improve test output for `script/fix-translation-errors.js` and `tests/content/lint-files.js`
- make it so `script/reset-translated-file.js` can handle files that have been renamed
2021-03-26 19:21:45 +00:00
Sarah Schneider
db992f7192 lint 2021-03-24 14:01:47 -04:00
Sarah Schneider
2af643eac7 run tests on content 2021-03-24 13:27:27 -04:00
James M. Greene
9e31597ee4 Use promisified fs.readFile instead of fs.promises.readFile (#18204)
* Create a readFileAsync wrapper module

* Use the readFileAsync wrapper module instead of fs.promises.readFile

* Fix require path in test
2021-03-10 17:57:10 +00:00
Jason Etcovitch
e68e6a5185 Revert "Revert "Absorb @github-docs/frontmatter (#17783)" (#17793)" (#17799)
* Revert "Revert "Absorb @github-docs/frontmatter (#17783)" (#17793)"

This reverts commit 11baf43eee.

* Move revalidator to depedencies
2021-02-11 11:15:59 -05:00
Jason Etcovitch
11baf43eee Revert "Absorb @github-docs/frontmatter (#17783)" (#17793)
This reverts commit 1e96c03489.
2021-02-10 20:28:41 +00:00
Jason Etcovitch
1e96c03489 Absorb @github-docs/frontmatter (#17783) 2021-02-10 15:10:46 -05:00
Vanessa Yuen
25ff6b94ff Translation tools to make our lives easier (#17712)
* create script to fix easy-to-fix frontmatter errors in translation

* improve reset-translated-file.js: allow reverting to the same file from `main` branch

* fix release-notes as well

* also lints liquid in frontmatter
2021-02-09 10:11:12 -05:00
Jason Etcovitch
39e0e0dda1 Use Liquidjs instead of Liquid (#16743)
* Install liquidjs, uninstall liquid

* Comment a bunch of stuff out to get going

* Fix invalid includes

* Fix all includes (path => 'path')

* Get the homepage to render

* Do link-in-list kinda

* Revert "Fix all includes (path => 'path')"

This reverts commit d6fead646353aa5041d9229470a62a1d487456b9.

* Support non-dynamic partials

* Extract getTemplate helper

* Do remaining custom Liquid tags

* Fix some custom tag bugs

* Moar bugs

* Re-add link tag

* Cleaner diff

* Actually fix extended markdown tags

* Fully comment out version matchers

* Smaller diff

* Rely only on Liquid internals for conditionals

* Use new operators option in Liquid engine

* Fix link.js

* Don't need options

* Updoot to the right doot

* Fix some bugs

* Fix another bug

* Pass a test

* Fix the translate bits

* Adjust a test

* Fix another invalid Liquid bug

* Two more borked translations

* Found some more

* Don't need this change

* Revert "Don't need this change"

This reverts commit a916d619747f0492865a69c3e237c97c4d4e7fad.

* This should fix the broken links

* Missed one

* Revert "This should fix the broken links"

This reverts commit e6c2cc0d9055d958706260d57edbe293281c150e.

* Revert "Missed one"

This reverts commit bbe1f23baf16e020f6f7931589decb1afc75dfbd.

* Updoot liquidjs
2021-02-08 12:58:51 -05:00
Vanessa Yuen
a1d93a7619 Lint translation files (#17561)
### Why:

A lot of content gets mistranslated, some common patterns are: frontmatter date and enums getting translated, liquid tags get translated or go missing during the translation process. These translation errors are tough to catch, especially when they often come in huge PRs. 

### What's being changed:

- Frontmatter is also getting linted against schema as part of `lint-files`
- When an environment variable `TEST_TRANSLATION` is passed,
   - `lint-files` will run its tests against all files that have been newly translated (by git-diffing between `translations` branch and `main` branch), and
   - results are outputted using a custom jest reporter. The output is formatted in a way that makes it easy to exclude the problematic translated files from being merged, and to share the errors with [localization support](https://github.com/github/localization-support/issues/489). 
- Run the implemented translation test as part of the existing `Node.js Tests - Translations` workflow
2021-02-01 17:59:33 +01:00
Jason Etcovitch
8d4f3e65fe Move test & script utils out of /lib (#17517)
* Remove an unused file

* Move authenticate-to-aws to scripts/utils

* Move crowdin-config to tests/utils

* Remove add-frontmatter-to-file

* Move find-unused-assets

* Move git-utils to script/utils

* Move lib/github to script/utils

* Revert "Remove an unused file"

This reverts commit cd93ad846a0354e957359f23124eb0724c9147cf.

* Move find-extraneous-translation-files to script/utils

* We already have tests/helpers

* Rename script/utils => helpers for consistency

* Forgot a path

* Fix path to crowdin-config

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
2021-01-29 10:30:51 -05:00
Jason Etcovitch
612ec766aa Add glossaries to lint-files tests (#17481)
* Add glossariesDir to glob

* Actually make the test work

* Fix the (legitimate) failures
2021-01-26 21:19:27 +00:00