1
0
mirror of synced 2025-12-21 19:06:49 -05:00
Commit Graph

508 Commits

Author SHA1 Message Date
Peter Bengtsson
7783171b56 get popularity from article path (#28016) 2022-05-26 21:27:09 +00:00
Peter Bengtsson
8d4e1cda62 use shorthand notation (#27919) 2022-05-23 18:22:44 +00: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
Peter Bengtsson
d5cef9c5d6 run link checker against localhost:4000 instead of prod (#27757)
* run link checker against localhost:4000 instead of prod

* exclude docs.github.com

* print output if possible

* upload broken_links.md as artifact

* debug broken_links.md
2022-05-19 13:12:07 +00:00
Hector Alfaro
6cbe4d131e clean up unnecessary conditional code 2022-05-13 12:40:07 -04:00
Hector Alfaro
807e8b5509 bring conditional removal back into main block 2022-05-13 12:40:07 -04:00
Hector Alfaro
2d184b705b squash bug with indices not updating appropriately 2022-05-13 12:40:06 -04:00
Hector Alfaro
80ff57ff47 squash bug missing nested conditionals 2022-05-13 12:40:05 -04:00
Hector Alfaro
67c4c193a9 handle unnecessary conditionals, those with all versions 2022-05-13 12:40:05 -04:00
Peter Bengtsson
5733237c00 remove add-tags-to-articles script (#27639) 2022-05-12 10:51:40 -04:00
Grace Park
2e821f52ff REST subcategory/category rendering test and refactor test-open-api-schema (#27138)
* first stage of test

* update test

* add rest test for categories and subcategories rendering

* update timeout back to original

* remove export

* remove testing

* refactor test-open-api-schema

* remove function

* remove check

* remove slash

* remove comment

* rearrange

* update getting the categories and maptopic levels

* update tests

* update copy

* add error message task
2022-05-10 17:09:47 +00:00
Rachael Sewell
14111129e2 display dictionary type body parameters (#27483) 2022-05-04 21:50:49 +00:00
Grace Park
f2c6004aaa REST API Pages: fix links of endpoints-available-for-github-apps page (#27425) 2022-05-04 00:56:04 +00:00
Rachael Sewell
5f4f858b94 REST two-pane layout (#26954) 2022-05-02 10:10:33 -07:00
Matt Pollard
2dbfef88bc Improve YAML file handling for script to toggle lightweight feature flags for GitHub AE (#27170)
* Refactor for YAML files

* Accommodate strings in YAML files

* feedbacked

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-04-28 18:48:13 +00:00
Baoshuo Ren
685a69703b chore: remove git.io (#17417)
All links on git.io will stop redirecting after April 29, 2022.

- https://github.blog/changelog/2022-04-25-git-io-deprecation/
2022-04-27 06:43:01 -07:00
Rachael Sewell
749efd7b99 Rest redirect endpoint (#27027) 2022-04-25 16:14:04 +00:00
Rachael Sewell
434f49afe0 remove prerendered request description (#27185) 2022-04-25 16:09:48 +00:00
Grace Park
bb2e234238 update openapi test (#27127) 2022-04-21 19:56:30 +00:00
Robert Sese
78ebd2e483 openapi: render example request and response descriptions (#27057)
* Render code example response descriptions

* Add updated decorated files

* Pluralize

* Also render example request descriptions

* Add updated decorated files
2022-04-20 17:51:13 -05:00
Sarah Schneider
9abbfb6ee4 Merge branch 'main' into move-bookmarklets 2022-04-20 14:43:20 -04:00
Grace Park
b98c83e924 REST operations sidebar (#26225)
* testing out a rest operations sidebar

* cleanup

* renamed 5 files

* renamed 5 files

* set redirect_from on 5 files

* renamed 1 files

* renamed 1 files

* renamed 3 files

* renamed 1 files

* renamed 1 files

* renamed 3 files

* renamed 1 files

* renamed 2 files

* renamed 1 files

* renamed 4 files

* renamed 15 files

* renamed 2 files

* renamed 6 files

* renamed 1 files

* renamed 4 files

* renamed 7 files

* renamed 1 files

* renamed 3 files

* renamed 3 files

* renamed 1 files

* renamed 5 files

* renamed 1 files

* renamed 1 files

* renamed 3 files

* renamed 4 files

* renamed 1 files

* renamed 1 files

* renamed 2 files

* renamed 4 files

* renamed 1 files

* renamed 1 files

* renamed 1 files

* renamed 6 files

* renamed 6 files

* renamed 4 files

* move files

* adding more

* updating to add restcontext and start of removing data/reusables/rest-reference

* removed data/reusables

* add a RestMiniTocItem and updating the filtering to add a subcategory so all manually added H3s are in mini tocs in addition to operations

* remove console log

* [WIP]: REST New Proposal Sidebar (#26471)

* saving

* update sidebar

* remove console log

* update guides and overview

* import Category for category level rest pages

* update undefined restOperations

* update restOperationData category and subcategory levels"

* minor updates

* update get mini toc items function

* updating REST context for sidebar

* updating rest data

* remove console logs

* WIP: mini-toc-ing the sidebar

Co-authored-by: Robert Sese <rsese@github.com>

* A little cleanup

* Fix first subcategory link and add some comments

* updating anchor links in sidebar

* adding updates

* remove standalone

* update product and maptopic pages using article context

* add conditional link wrapper

* fix sidebar toggle and versions for enterprise admin

* update versions per subcategory

* Highlight sidebar link for current page

* Update miniToc hash links and hash change tracking

* fix unique key in CollapsibleSection

* Fix list markup

* remove title

* update permissions

* Hide minitocs on landing (#26594)

* hide minitocs on landing page

* simplify page components and remove minitoc from sidebar for guides/overview

* fix carats and category fix

* remove id

Co-authored-by: Grace Park <gracepark@github.com>

* updating content based on versions script check with the OpenAPI

* update script and content files

* update script and content/rest files

* update to add TocLanding

* update script

* update index files

* add codespaces repository-secrets

* remove openapi schema check script

* remove minitocs at the top

* add h2 about the {title} api

* fix tests/unit/openapi-schema.js

* Fix linting tests

* fix search/topics test

* fix tests/unit/pages test

* update rest/reference links in components

* run prettier

* Update components/rest/RestReferencePage.tsx

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

* Update components/rest/RestReferencePage.tsx

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

* Update pages/[versionId]/rest/[category]/[subcategory].tsx

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

* Update pages/[versionId]/rest/[category]/[subcategory].tsx

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

* Update pages/[versionId]/rest/[category]/[subcategory].tsx

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

* Update pages/[versionId]/rest/[category]/[subcategory].tsx

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

* Update tests/unit/openapi-schema.js

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

* updating comment location

* remove dependabot override

* remove path-utils current product update for rest

* run linter

* remove dependabot.md and remove h2 heading on restreference

* update the correct product to rest for rest pages

* adding comments for updates to path-utils

* remove console log

* REST sidebar: handle legacy v3 redirects (#26686)

* Add script to handle legacy v3 REST redirects

* Run the script

* Handle a redirect to a redirect

* Update REST test URLs

* 'await' and test runs subcategory of checks

* Update REST URLs for routing/developer-site-redirects tests

* Update developer-redirects fixture with new REST URLs

* Resolve merge conflicts

* Update rest-redirects fixture with new REST URLs

* Fix broken links with REST pages re-org

* redirectTo could be undefined

* Fix script for posterity, can't redirect paths with hashes

* Remove invalid hash redirects

* Typically don't need to save one-off scripts

* Undo redirect changes (not necessary for handling v3 redirects)

* Remove script-added redirects

* Update old v3 redirects with new REST URLs

* No more GHES search indexing page

* 'org' not 'organization'

* Update fixture data for new REST URLs

* revert any content directory changes

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

* Adding test rest (#26750)

* add test to check openapi schema versions and content rest frontmatter versions

* update lib/redirects

* fix test and add error messages

* adding repository secrets

* adding repository-secrets.md

* Revert "update lib/redirects"

This reverts commit 3aafe28265764d5bc09c0c478c8e0ca099c8fbcf.

* remove lib/redirects changes and console logs

* Update lib/rest/index.js

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

* update unique key

* Rest client side redirects (#26754)

* adding tags subcategory for the rest content repos category

* run prettier

* bug fix for anchor scrolls" (#26892)

* updating width size for rest reference page

* Rest sidebar consolidation (#26862)

* refactor sidebar

* fix articlecontext provider issue on rest product landing page for all versions

* fix a bug, create new component

* revert change to create new component and fix bug

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

* Set currentAnchor with a hashchange handler (#26923)

* Rest sidebar design tweaks (#26807)

* Rest sidebar design tweaks

* tweak color to subtle

* use muted color and margin for line

* update to design feedback

Co-authored-by: Grace Park <gracepark@github.com>

* Remove cheerio from rest-collapsible (#26948)

* remove cheerio from rest-collapsible

* update type

* adding endswith instead

* use productId instead

* one off edge case for secret-scanning

* Reorganize subcategory and category, Update pre -> div, Add RestContext (#26950)

* reorganize subcategory and category

* add RestContext

* update comment

* update for endpoints page

* add comment

* move object to restcontext

* remove effectiveDate in restcontext

* remove width calculation for rest reference page

* fix adding manual writer's minitocs to sidebar

* update with feedback

* update comment

* update isRestReferencePage

* remove page component and fix bug

* adding back rest/index.tsx

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

* update content/rest"

* add back design tweak

* update to div

* update margins on rest api reference

* remove page component

* adding tests

* separate product from rest sidebar (#27065)

* separate product from rest sidebar

* Use ProductCollapsibleSections for product pages

* fix tests

Co-authored-by: Robert Sese <rsese@github.com>
Co-authored-by: Grace Park <gracepark@github.com>

* Rest sidebar translations (#27052)

* update translations

* remove general test

Co-authored-by: Robert Sese <rsese@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-04-20 10:19:48 -07:00
Peter Bengtsson
2fe74dc32b check broken links using localhost (#27010)
* Revert "fix(link-check): add WAF token to avoid 403 (#26964)"

This reverts commit 8bb525188f.

* check broken links using localhost

* remove temp comment
2022-04-19 15:17:37 +00:00
Sarah Schneider
e48469d34e update generated bookmarklet 2022-04-19 10:06:14 -04:00
Sarah Schneider
7a3b412a91 incorporate @lucascosti changes from docs-content PR 6604 and also change dotcom to FPT 2022-04-19 10:05:46 -04:00
Sarah Schneider
a326f133c3 restore IIFEs and remove breaking spaces 2022-04-19 10:04:50 -04:00
Sarah Schneider
08ac9529b2 add links in README plus a few edits 2022-04-19 10:04:09 -04:00
Sarah Schneider
53f0383fa4 Merge branch 'main' of github.com:github/docs-internal into move-bookmarklets 2022-04-19 09:20:49 -04:00
Robert Sese
0056a2d648 openapi: fix array of objects params (#26978)
* Make a copy of the type array, splice() will modify it

* Also check for 'array' in array of types

* Add updated decorated files

* Make copying clearer

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

Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-04-15 22:50:27 +00:00
Mike Surowiec
8bb525188f fix(link-check): add WAF token to avoid 403 (#26964) 2022-04-15 16:29:23 -05:00
Robert Sese
aff739a381 openapi: fix param description rendering (#26913)
* Should be 'param.descriptionHTML'

* Add updated decorated files
2022-04-13 20:22:08 +00:00
Sarah Schneider
dc2bd4b140 add bookmarklets to script dir 2022-04-13 15:53:59 -04:00
Robert Sese
cb355c6da3 openapi: fix nested params (#26894)
* Check for 'object' in ['object', 'null']

* Add updated decorated files

* arrays can also be null with this format

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

* arrays can also be null with this format

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

Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-04-12 18:15:22 -05:00
Sarah Edwards
67e194eea9 Organization discussions and polls (#26517)
Co-authored-by: Steve Guntrip <stevecat@github.com>
2022-04-12 16:11:20 +00:00
Rachael Sewell
e86dc05ecc add openapi example tests (#26860) 2022-04-11 16:08:15 -07:00
Rachael Sewell
02dbebbef3 render existing openapi examples (#26405) 2022-04-11 16:09:03 +00:00
Peter Bengtsson
5d7973b928 make PR about deletable orphan assets (#26484)
* warn on orphan images

* oops

* temporarily adding orphan image

* fix the bug

* permission

* better comment

* try this

* try this

* debugging

* debugging

* using fs

* cjs

* remove experiment image

* debugging

* debugging

* try that

* try that

* git config

* cleaning

* token

* body

* label

* try that

* try that

* try that

* not upstream

* try that

* token twice

* try again

* cleaning up

* fix unit test

* one more exception

* feedbacked
2022-03-30 11:56:18 -04:00
Peter Bengtsson
b685b6fda7 don't need disk caching for site data (#26333)
* reinstate

* start server manually

* routing tests too

* skip more

* sleep more and fail if not 200

* use e2etest for content/ too

* automatically start server for jest

* does this work?

* feedbacked

* rename things

* getting it to work

* add dev dependency

* install the right version

* don't need to start that

* fix package lock

* update readme about it

* feedbacked

* don't need disk caching for site-data
2022-03-19 16:05:27 +00:00
Peter Bengtsson
4fcd3ae25f automatically start server for jest (#26206)
* reinstate

* start server manually

* routing tests too

* skip more

* sleep more and fail if not 200

* use e2etest for content/ too

* automatically start server for jest

* does this work?

* feedbacked

* rename things

* getting it to work

* add dev dependency

* install the right version

* don't need to start that

* fix package lock

* update readme about it

* feedbacked
2022-03-18 21:46:07 +00:00
Peter Bengtsson
3d298dd88d CLI tool to rename file or tree (#25306)
* CLI tool to rename file or tree

* it works

* progress

* progress

* wip

* wip

* wip

* debugging

* fixed

* remove console logging

* add support for also updating learning-tracks

* cope with the 'children' key in the root content/index.md unicorn

* update childGroups too

* guardrails

* refactor

* tidying up arguments

* refactored for single files

* nicer error in pre-validation of the first file argument

* regression fix

* fix for moving directories

* delete lib/redirects/.redirects-cache.json if present
2022-03-18 20:44:43 +00:00
Grace Park
2c8713037d Move deploy keys from deployments to keys in rest pages (#26166)
* move deploy keys from deployments to keys in rest pages

* move minitocs above intro

* Update content/rest/reference/keys.md

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* add to banner, add redirects from deployments

* remove deploy keys from deployments intro

* update data/reusables name

* update - to _

* update script and add redirects for subcategories turned categories

Co-authored-by: Sarah Edwards <skedwards88@github.com>
2022-03-17 17:25:12 +00:00
Peter Bengtsson
01baeda3c0 sync serialize sitedata to disk (#25749)
* sync serialize sitedata to disk

* use os.tmpdir

* refactor tests

* debugging

* use log

* debugging

* louder about syntax errors

* warn-before-tests

* louder about disk-caching redirects

* less loud

* only in development again
2022-03-09 20:57:40 -05:00
Rachael Sewell
9fd4fe0a6c remove prerendered response rest docs (#25652) 2022-03-04 21:24:46 +00:00
Rachael Sewell
0fcf31cdc3 Support OpenAPI 3.1 (#25710) 2022-03-03 05:51:25 +00:00
Rachael Sewell
2ade7d8489 reactify rest pages (#25005) 2022-02-28 18:30:54 +00:00
Robert Sese
f48d536bbf Fix management console API URLs (#25562)
* No /api/v3 for mgmt console operations

* Add updated decorated files
2022-02-24 22:51:01 +00:00
dependabot[bot]
619ce22bab Bump @graphql-inspector/core from 2.9.0 to 3.1.1 (#25384) 2022-02-22 23:08:35 +00:00
Lucas Costi
e6af9ae1e6 Remove Actions REST enterprise subcategory (moved to Actions page) (#25065)
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-02-17 15:18:07 +10:00
Peter Bengtsson
53796d44ac make octicon search svgs cached longer (#25421)
* make octicon search svgs cached longer

* not an orphan exception
2022-02-16 17:11:43 +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