Compare commits

..

858 Commits

Author SHA1 Message Date
Claire Chabas 0780396e81 keep useless import to keep PR in scope 2025-01-30 19:01:19 +01:00
Claire Chabas ce082549d8 Merge branch 'main' into claire/update-node-version-required
* main:
  Avoid dereferencing before caching (#2793)
2025-01-30 18:56:30 +01:00
Greg Bergé d9c8d57e8e Avoid dereferencing before caching (#2793) 2025-01-30 17:15:19 +01:00
Claire Chabas bae43d08ff Update Node version required 2025-01-30 17:05:35 +01:00
Greg Bergé 0d615e3888 Highlight code client-side (#2786) 2025-01-30 16:08:39 +01:00
Greg Bergé 68287d3df4 Cache API spec for 24 hours, revalidated every 2 hours (#2792) 2025-01-30 15:16:45 +01:00
Greg Bergé dff08ae3e3 Load Scalar only when the button is pressed (#2790) 2025-01-30 15:01:59 +01:00
Zeno Kapitein 8cfa67c1dd Fix default outline list styling (#2788) 2025-01-30 13:56:43 +01:00
Greg Bergé b41d425993 Improve OpenAPI performances (#2784) 2025-01-30 11:13:01 +01:00
Greg Bergé 12c7862250 Use Scalar OpenAPI parser (#2780) 2025-01-30 08:44:08 +01:00
Greg Bergé 6f54826296 Replace highlight colors (#2781) 2025-01-29 15:00:01 +01:00
Steven H ccf2cffc4b Hotfix docs.radiantdrift.com crashing in production. (#2782) 2025-01-29 12:42:01 +00:00
Zeno Kapitein f7b801b4c8 Support user comments after rating (#2771)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2025-01-28 09:39:32 +01:00
Samy Pessé 95f2aa45eb Integration with new site insights (#2777) 2025-01-28 09:18:50 +01:00
Samy Pessé 9524ff5f5a Migrate to bun text-based lockfile (#2770) 2025-01-28 08:47:40 +01:00
Steven H 1823101b03 Fix internal properties appearing in OpenAPI docs. (#2774) 2025-01-23 21:35:06 +00:00
Samy Pessé 1a8cfd2a8b Hide toolbar when previewing (#2773) 2025-01-23 21:58:02 +01:00
Greg Bergé 5b4e710770 Support llms.txt (#2768) 2025-01-23 16:37:45 +01:00
Zeno Kapitein 1762f85ef9 Reduce gap between subsequent header buttons (#2765) 2025-01-23 14:10:47 +01:00
Samy Pessé d370a3f0e3 Align the revisions/changes path for multi-id with the normal one (#2769) 2025-01-23 10:00:11 +01:00
Greg Bergé d3e573c2e9 Generate sitemap for all sections and spaces (#2767) 2025-01-22 16:57:57 +01:00
Zeno Kapitein 94876e3ad1 Fix regression issue with page icons for multi-line titles (#2764) 2025-01-21 17:03:33 +01:00
Zeno Kapitein ad190602c7 Tweak card background, better margins for card headings (#2763) 2025-01-21 17:03:22 +01:00
Scott Cazan 162b4b78b6 Add HTTP examples to API blocks (#2759) 2025-01-21 15:34:42 +01:00
Zeno Kapitein e5dc05e994 Restyle footer, allow >4 link groups (#2761) 2025-01-21 14:50:33 +01:00
Samy Pessé b46cff70c0 Fix insights prop passed to Link (#2760) 2025-01-21 07:52:00 +01:00
Greg Bergé b6c3870eda Add support for keyboard marks (#2758) 2025-01-20 12:06:38 +01:00
Taran Vohra 1c1f504601 Fix Image zoom e2e test (#2757) 2025-01-20 16:13:23 +05:30
Taran Vohra 1b8a45678c Fix image blocks zoomable behaviour (#2756) 2025-01-20 13:22:12 +05:30
Viktor Renkema 38de9eb9d7 Restore borders on embed blocks with Captions (#2755) 2025-01-17 12:50:23 +01:00
Greg Bergé eac1314a7d Lazy load iframely script (#2753) 2025-01-17 08:28:38 +01:00
Greg Bergé 29d59793dc Disable C/C++ highlight temporarily (#2754) 2025-01-17 08:28:10 +01:00
Greg Bergé 128ad20280 Ignore cache invalidation error from local backend (#2752) 2025-01-15 14:13:10 +01:00
Viktor Renkema 994ebff8c1 Remove borders on Caption wrapper (#2742) 2025-01-15 12:05:13 +01:00
Greg Bergé 142938401c Fix error when accessing some not found pages (#2751) 2025-01-15 12:04:27 +01:00
Greg Bergé 65cc4afb23 Fix error when accessing a change request not found (#2723) 2025-01-14 19:52:26 +01:00
Greg Bergé e000f23c44 Fix visual testing flakiness (#2750) 2025-01-14 18:03:29 +01:00
Claire Chabas 1de9d1aa33 Antialias text but not code/pre elements (#2747) 2025-01-14 15:48:05 +01:00
Zeno Kapitein 0e601e277b Header button styling (#2748) 2025-01-14 15:20:26 +01:00
Greg Bergé e582a47f37 Remove screenshot from VA test (#2749) 2025-01-14 15:05:04 +01:00
Greg Bergé 1b251a78b0 Fix visitor authentication end-to-end tests (#2746) 2025-01-14 14:42:58 +01:00
Zeno Kapitein 24f5249ae9 Fix vertical section overflow (#2744) 2025-01-14 12:49:20 +01:00
Greg Bergé 17c1631013 Visual testing stabilization (#2741) 2025-01-14 12:39:12 +01:00
Greg Bergé cb100d5e00 Allow only valid values for theme query string (#2745) 2025-01-14 12:33:59 +01:00
Greg Bergé 1fcc807513 Fix customization not found (#2734) 2025-01-14 12:09:43 +01:00
Zeno Kapitein 5664e5a30f Fix variant dropdown styling in header (#2730) 2025-01-14 12:09:04 +01:00
Taran Vohra 26e64019d8 Remove KV cache backend and only use DO cache (#2743) 2025-01-14 16:29:48 +05:30
Zeno Kapitein 56331d2e74 Fix breadcrumbs emoji display + add contrast styles (#2735) 2025-01-14 11:46:26 +01:00
Greg Bergé 55b095e503 Wait for icons to be loaded before screenshot (#2740) 2025-01-14 10:35:44 +01:00
Scott Cazan 6a073e1dd5 Enable anti-aliasing for published docs (#2736) 2025-01-14 10:13:40 +01:00
Viktor Renkema 960e25a3f6 Apply vertical alignment to Tables as configured in-app (#2627) 2025-01-14 09:45:15 +01:00
Greg Bergé 1de338c312 Remove useless animation on section tabs (#2739) 2025-01-14 08:57:08 +01:00
Steven H dbba50cea4 Fix an issue where search and Ask AI triggers unnecessary renders when in a Visitor Authenticated site. (#2738) 2025-01-13 21:31:40 +00:00
Zeno Kapitein 8f046a9cd6 Start using tint in more places: TOC and PageAside (#2733) 2025-01-13 15:00:19 +01:00
Greg Bergé 2906e6038a Downgrade to Next.js v14 (#2732) 2025-01-13 14:50:31 +01:00
Greg Bergé 87b8ea8c05 Revert reading a context from headers and passing it (#2727) 2025-01-13 12:44:00 +01:00
Greg Bergé 47971dce31 Fix OG image generation (#2729) 2025-01-13 12:20:24 +01:00
Greg Bergé 528a05398c Fix server actions stability (#2728)
Co-authored-by: Steven Hall <steven@gitbook.io>
2025-01-13 10:04:14 +00:00
Taran Vohra f584148ab9 temporarily add back cloudflare KV cache backend (#2726) 2025-01-12 12:57:38 +05:30
Zeno Kapitein 0de22f7a96 Fix padding of ads box (#2724) 2025-01-10 21:49:54 +01:00
Greg Bergé 09c7c30779 Try to fix error on og image generation (#2722) 2025-01-10 21:38:25 +01:00
Greg Bergé fde32e26bf Force route handler to be dynamic to avoid errors (#2721) 2025-01-10 16:26:25 +01:00
Greg Bergé a6f65916f1 Separate cache for HTTP methods (#2720) 2025-01-10 16:09:35 +01:00
Claire Chabas 6059efe094 Fix no results showing while there are results (#2719) 2025-01-10 16:08:45 +01:00
Zeno Kapitein 16194c50ba Vertical orientation for sections list on sites without header (#2714) 2025-01-10 14:40:10 +01:00
Steven H af3c6a971c Reintroduce a safety check around search whilst we continue investigating caching. (#2718)
Co-authored-by: Greg Bergé <berge.greg@gmail.com>
2025-01-10 13:32:44 +00:00
Greg Bergé ecfdb976a3 Cleanup headers usage (#2717) 2025-01-10 14:15:39 +01:00
Steven H 08acea651a Log an exception if an empty cache object is returned (#2716)
Co-authored-by: Greg Bergé <berge.greg@gmail.com>
2025-01-10 09:25:40 +00:00
Greg Bergé 6b503608cd Fix view transition error on Safari (#2715) 2025-01-10 07:27:49 +01:00
Greg Bergé d8763997a5 Fix UI search with no ask (#2713) 2025-01-09 17:22:06 +01:00
Greg Bergé 32aa1f99c1 Handle security issue with cookies on Safari (#2711) 2025-01-09 17:04:26 +01:00
Valentino Hudhra 718a8a54b1 Position the variant picker in the ToC (#2632)
Co-authored-by: Zeno Kapitein <admin@zeno.zone>
Co-authored-by: Zeno Kapitein <zenomilan@me.com>
2025-01-09 16:47:20 +01:00
Zeno Kapitein 741dd490d4 Bump heading-3 font size to differentiate it from paragraphs (#2706) 2025-01-09 16:43:04 +01:00
Greg Bergé 02d876e6d8 Fix search UI behaviour (#2712) 2025-01-09 16:27:04 +01:00
Greg Bergé 56c52e0bb0 Handle Firefox security error on localStorage (#2710) 2025-01-09 15:36:08 +01:00
Greg Bergé 6036becf93 Fix header menu scroll ref logic (#2708) 2025-01-09 14:22:34 +01:00
Greg Bergé 3a7210d514 Fix zoom image view transition on Safari (#2709) 2025-01-09 14:08:45 +01:00
Greg Bergé 6088fa582d Simplify search results logic (#2707) 2025-01-09 13:53:21 +01:00
Greg Bergé 6691492ef7 Fix viewing pdf from space (#2705) 2025-01-09 12:28:48 +01:00
Zeno Kapitein 7ee9158cd3 Restyle PageAside to use sidebar list styles (#2680)
Co-authored-by: Valentino Hudhra <v.hudhra@gmail.com>
Co-authored-by: Valentino Hudhra <2587839+valentin0h@users.noreply.github.com>
2025-01-09 11:21:30 +01:00
Claire Chabas 5ae1b883ab Fix shrinking page icons (#2702) 2025-01-08 16:59:32 +01:00
Greg Bergé 88397bf419 Flush Sentry events manually server-side (#2698) 2025-01-08 14:57:15 +01:00
Valentino Hudhra 1138d5935b Add sidebar new background styles (#2645)
Co-authored-by: Zeno Kapitein <admin@zeno.zone>
2025-01-08 14:01:06 +01:00
Greg Bergé 8276ba080e Make cookies access safer (#2694) 2025-01-08 13:12:41 +01:00
Greg Bergé 37d13d80f5 Pass string URL to fetch to avoid errors (#2695) 2025-01-08 13:01:10 +01:00
Greg Bergé 1c97536ab1 Fix Sentry instrumentation (again) (#2697) 2025-01-08 12:28:08 +01:00
Greg Bergé ca8f028cc0 Fix error in header mobile menu (#2696) 2025-01-08 11:09:58 +00:00
Claire Chabas 300f7bfe4b Fix search loading state (#2684) 2025-01-08 11:52:12 +01:00
Greg Bergé 82dc9c40f7 Simplify useHash algo used (#2689) 2025-01-08 11:37:48 +01:00
Greg Bergé 44a20fe5ee Improve scroll listener (#2692) 2025-01-08 11:17:22 +01:00
Greg Bergé b950a64406 improve browser support (#2693) 2025-01-08 11:08:29 +01:00
Greg Bergé c5f374f66f Move instrumentation to src folder (#2691) 2025-01-08 10:55:56 +01:00
Greg Bergé ae99f87db0 Improve emoji setup (#2688) 2025-01-08 10:11:35 +01:00
Greg Bergé 5112e3e79b Fix Sentry instrumentation server-side (#2690) 2025-01-08 09:52:02 +01:00
Greg Bergé c1e27ccacc Fix pass Sentry release properly (#2687) 2025-01-08 09:12:34 +01:00
Greg Bergé b0bd871997 Even safer local storage... (#2686) 2025-01-07 17:57:02 +01:00
Greg Bergé c30bc24fd6 Fix empty sitemap (#2685) 2025-01-07 17:09:51 +01:00
Greg Bergé 648f0e9e84 Various fixes (#2683) 2025-01-07 16:54:10 +01:00
Greg Bergé d2bc5672e0 Set Sentry release (#2682) 2025-01-07 16:36:44 +01:00
Greg Bergé 5c87ec7c2f Safer way to interact with localStorage (#2679) 2025-01-07 15:51:23 +01:00
Greg Bergé d66c184ed2 Ignore errors from event flushing (#2681) 2025-01-07 15:38:18 +01:00
Greg Bergé 12f25d8bfc Fix error from visitor id not set (#2678) 2025-01-07 15:18:05 +01:00
Greg Bergé cbe61397a3 Fix dynamic tabs infinite loop (#2677) 2025-01-07 14:54:28 +01:00
Greg Bergé deb8c54da3 Upgrade Next.js to v15 (#2671) 2025-01-07 10:42:02 +01:00
Greg Bergé 5dab70fab4 Fix "Parser" language syntax highlighting (#2676) 2025-01-07 10:23:25 +01:00
Greg Bergé 665b6bed66 Ignore invalid API calls to getSiteRedirectFromSource API (#2675) 2025-01-07 10:06:31 +01:00
Greg Bergé f4a90defc3 Remove Recoil (#2674) 2025-01-06 16:06:59 +01:00
Greg Bergé 46f63cbd55 Fix code format overriding (#2673)
Co-authored-by: eztaK-red <eztak.red@gmail.com>
2025-01-06 15:15:39 +01:00
Greg Bergé c77142a16f Log component stack in Sentry (#2672) 2025-01-06 13:14:22 +01:00
Steven H eb7c22f52a Revert Scalar to a previous version to mitigate an app crash happening when switching between API pages. (#2670) 2025-01-06 11:57:51 +00:00
Steven H e86e51f06f Fix an issue where the redirects of potentially malicious images were not going through. (#2666) 2024-12-30 14:41:54 +00:00
Steven H db74ea3001 Image optimization endpoint redirects to underlying image URL if the signature is not the latest. (#2665) 2024-12-30 13:08:49 +00:00
Steven H 99579ac29c Fix a vulnerability issue for images using an older version of the image signing parameter. (#2664) 2024-12-30 11:29:30 +00:00
Samy Pessé 2f6540e008 Don't cache VA and adaptive content responses (#2663) 2024-12-27 17:56:42 +01:00
Samy Pessé 72c3b80529 Pass visitor auth token to site insights events (#2662) 2024-12-26 19:06:29 +01:00
Viktor Renkema 8126a83c50 Reintro vertical table lines + hover state (#2653) 2024-12-25 08:41:54 +01:00
Samy Pessé 210c432b37 Fix PDF export crashing (#2661) 2024-12-23 14:52:50 +01:00
Amrit Kahlon f92e90603f Prevent multiple versions of codemirror from loading (#2660)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-12-21 23:46:16 +01:00
Samy Pessé 14172791e9 Track click on links for site insights (#2659) 2024-12-21 18:18:30 +01:00
Samy Pessé e4e2f524d4 Track site insight event when opening scalar client (#2658) 2024-12-21 15:57:10 +01:00
Amrit Kahlon fc7b16f6a7 Update scalar dependency (#2652) 2024-12-20 23:16:11 +01:00
Samy Pessé 6ba3ae74d5 Workaround until referrer is accepted by API as an empty string (#2656) 2024-12-20 19:23:52 +01:00
Samy Pessé c71d1598d8 Insights site events support (#2655) 2024-12-20 19:06:50 +01:00
Greg Bergé 5950657b0e Fix emojis display (#2648) 2024-12-20 11:30:56 +01:00
Samy Pessé 0e1a48cd06 Upgrade bun and setup-bun, switch to text lockfile (#2651)
Co-authored-by: Greg Bergé <berge.greg@gmail.com>
2024-12-20 11:19:54 +01:00
spastorelli 98245e5f20 Adapt code to pull token from customer backend generated custom cookies (#2650)
Co-authored-by: Steven Hall <steven@gitbook.io>
2024-12-19 18:29:32 +01:00
Zeno Kapitein 0b6ddca981 Fix variant selector for non-default themes (#2649) 2024-12-19 12:28:13 +01:00
spastorelli ea1468c892 Send redirectOnError param to getPublishedContent when token is pulled from cookie (#2626) 2024-12-19 11:16:06 +01:00
Greg Bergé e8e64bf510 Fix bullet list display on full size blocks (#2646) 2024-12-18 13:55:18 +01:00
Greg Bergé aaf8daf0d7 Improve search UI (#2643) 2024-12-18 13:42:47 +01:00
Zeno Kapitein 8af1abc4e1 Improve contrast of search box placeholder (#2639) 2024-12-18 12:14:06 +01:00
Zeno Kapitein 48ab59feb3 Improve contrast of list decoration (#2638) 2024-12-18 11:49:01 +01:00
Samy Pessé f64d5073d4 Version Packages (#2557)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-18 10:25:08 +01:00
Samy Pessé 53b9f10ac8 Prepare @gitbook/proxy to support serving under sub-directory (#2641) 2024-12-18 10:05:31 +01:00
Samy Pessé 75606e4df7 Fix missing env GITBOOK_ASSETS_PREFIX passed to build (#2642) 2024-12-17 21:46:04 +01:00
Claire Chabas 0643b7f351 Improve ask/search Enter key press UX (#2624)
Co-authored-by: Zeno Kapitein <admin@zeno.zone>
2024-12-17 18:08:29 +01:00
Claire Chabas 5b3b4e0614 Fix closing search modal on Escape key press (#2637) 2024-12-17 15:33:36 +01:00
Samy Pessé 8d039d1348 Pass down ancestors instead of computing them (#2635) 2024-12-16 21:11:46 +01:00
Zeno Kapitein 87eea73081 Fix margin and image resolution of header logo (#2633) 2024-12-16 14:34:00 +01:00
Zeno Kapitein 67a6fb4c87 Fix localised search string from wrapping search box (#2630) 2024-12-13 16:48:06 +01:00
Zeno Kapitein 23584c9862 Update header styling (#2613)
Co-authored-by: Valentino Hudhra <v.hudhra@gmail.com>
Co-authored-by: Valentino Hudhra <2587839+valentin0h@users.noreply.github.com>
2024-12-13 15:51:23 +01:00
Zeno Kapitein 2f767125c4 Add breadcrumbs to page header (#2628) 2024-12-13 15:20:07 +01:00
Greg Bergé c73e07d42d Increase token max length to fix code not highlighted (#2629) 2024-12-13 13:16:55 +01:00
Viktor Renkema 6b5d7e6057 Improve styles of Tables (#2623) 2024-12-13 08:15:52 +01:00
Greg Bergé 076dc48e89 Fix expandable block anchor resolution (#2625) 2024-12-12 23:25:29 +01:00
Greg Bergé bb208ab36a Update JoyPixels (#2619) 2024-12-12 09:05:12 +01:00
Viktor Renkema 60e35001b6 Refactor Table to use flex layouts (#2622) 2024-12-11 21:34:37 +01:00
Greg Bergé 29a0d7ea02 Fix sublinks display on mobile (#2620) 2024-12-11 18:57:55 +01:00
Greg Bergé 1f2b7f7acf Prevent resizing AVIF (not supported by Cloudflare) (#2621) 2024-12-11 15:17:25 +01:00
spastorelli 39e5cb63ef Fix context Id not returned by lookupSpaceByAPI (#2618) 2024-12-11 10:54:17 +01:00
spastorelli 5b5928fb8d Fix VA e2e tests when ran locally (#2617) 2024-12-11 08:34:05 +01:00
Greg Bergé 08068743a5 Remove Next.js cache on CI (#2616) 2024-12-10 18:53:47 +01:00
Greg Bergé 35eae1adcf Fix canonical in a safe way (#2589) 2024-12-10 17:47:57 +01:00
Greg Bergé e85d357abd Fix React DOM warning (#2615) 2024-12-10 17:39:22 +01:00
spastorelli 31396d8109 Adapt GBO cache logic to support users sessions info (#2606) 2024-12-10 14:11:59 +01:00
Zeno Kapitein 664debc0bc Add tint color (#2605)
Co-authored-by: Valentino Hudhra <v.hudhra@gmail.com>
Co-authored-by: Valentino Hudhra <2587839+valentin0h@users.noreply.github.com>
2024-12-09 17:19:44 +01:00
Viktor Renkema 56c31c76b3 Center-align inline images (#2609) 2024-12-09 13:21:43 +01:00
Viktor Renkema 2d1a71f3d1 Allow cells in tables to use more available space (#2611) 2024-12-09 13:11:05 +01:00
Valentino Hudhra c67cd73058 Add visual tests for tint (#2601) 2024-12-09 12:29:03 +01:00
Greg Bergé 2572cb4352 Pin React versions (#2610) 2024-12-09 11:14:02 +01:00
Steven H c9f6c7ccac Fix an issue where Ask AI answers with too many sources could crash the Worker. (#2608) 2024-12-07 15:23:10 +00:00
Steven Hall b6520b0dbc hotfix: Fix an issue where Ask AI was crashing on some requests. 2024-12-06 22:26:41 +00:00
Steven H 9fe8142117 Fix an issue where Ask AI was erroring due to an object being passed as a param. (#2607) 2024-12-06 21:55:59 +00:00
Steven H 57cdd25b5f Ask AI now goes through the site API instead of spaces. (#2598) 2024-12-06 20:06:49 +00:00
Samy Pessé 1005ee5d52 Prevent resizing the url of an image already resized (#2600) 2024-12-05 16:34:31 +01:00
Valentino Hudhra d9bb9f9a07 Fix cookie banner button being non responsive (#2599) 2024-12-05 14:04:03 +01:00
Greg Bergé 75a6fabe61 Support dropdown without link (#2596) 2024-12-04 12:05:17 +01:00
Greg Bergé 75e29b69cc Allow to work locally (#2597) 2024-12-03 14:49:13 +01:00
Samy Pessé ffd3937538 Fix security issue with images resizing (#2595) 2024-12-03 08:51:46 +01:00
Valentino Hudhra 575587e4c5 Improve footer link styling (#2591) 2024-12-01 07:54:45 +01:00
Brett Jephson 2ce59d7c92 Fix whitespace added with image (#2594) 2024-11-29 17:10:29 +00:00
Brett Jephson 3b3d6e2a73 Add an icon to site sections (#2593) 2024-11-29 16:09:06 +00:00
Zeno Kapitein f2a467fdbf Fix hint block decoration color (#2590) 2024-11-29 16:40:10 +01:00
vibhanshub 867481c66d Support Integers in Response sample (#2592) 2024-11-28 14:19:37 +00:00
spastorelli fc8065b7a8 Revert "Fix canonical URL ending with "/" (#2586)" (#2588) 2024-11-27 13:05:34 +01:00
Greg Bergé 28f1ed9205 Fix canonical URL ending with "/" (#2586) 2024-11-26 21:57:15 +01:00
Viktor Renkema 568266bc9a Add transitions to Sections bg and line (#2491) 2024-11-26 19:59:07 +01:00
Samy Pessé 7739f341b8 Revert "Serve the correct status code for not found and redirects 👌" (#2587) 2024-11-26 18:36:00 +01:00
Greg Bergé 2b501f191c Serve the correct status code for not found and redirects 👌 (#2582) 2024-11-26 18:05:47 +01:00
Zeno Kapitein aa2ed0fda1 Restyle hint block (#2579) 2024-11-26 12:41:47 +01:00
Greg Bergé 51cba074d7 Update shiki (#2583) 2024-11-26 11:50:08 +01:00
Taran Vohra 2c945c663c Get the best possible target space for content refs (#2580) 2024-11-26 10:53:37 +05:30
Viktor Renkema d9a18ecabb Improve contrast ratio for text color on image captions (#2584) 2024-11-25 14:01:09 +01:00
Greg Bergé eab7931afb Parallelize and remove useless Promise.all (#2581) 2024-11-22 15:54:56 +01:00
Taran Vohra 99b6c92377 Resolve site level redirects (#2577) 2024-11-22 12:04:15 +05:30
Zeno Kapitein 4d56f1163b Improve styling of search & ask AI box (#2576) 2024-11-20 16:59:15 +01:00
Brett Jephson 07cf835551 Add a scroll margin to the top when layout has sections (#2574) 2024-11-19 16:34:27 +00:00
Steven H 061c0c1a90 Fix a regression in variant drop-down caused by missing z-index. (#2575) 2024-11-19 17:23:44 +01:00
Anthony Lio 1ed18c05ef Adds missing css variables (#2558)
Co-authored-by: Steven H <steven@gitbook.io>
2024-11-19 16:08:07 +01:00
Steven H ca134c8a60 Fix an issue where the active site section indicator appeared above any dropdowns. (#2568) 2024-11-19 15:16:47 +01:00
Amrit Kahlon 7ba67fd852 chore: scalar bump (#2571)
Co-authored-by: Steven Hall <steven@gitbook.io>
2024-11-19 13:54:35 +01:00
Taran Vohra 7675c2c411 use getPublishedContentSite API (#2570)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-11-15 09:21:08 +01:00
Brett Jephson 7c71363af8 Set adjustFallbackFont to false for mono font (#2569) 2024-11-12 13:03:25 +00:00
Steven H d48926eb2a Fix an issue where the space dropdown was shown under the site sections in Safari. (#2567) 2024-11-05 11:49:33 +00:00
Steven H d843e5e06f Fix an issue where the space dropdown could appear behind the header. (#2566) 2024-11-05 09:47:32 +00:00
Steven H a2e564738e Fix the styling of site section tabs on smaller screens. (#2565) 2024-11-04 17:36:10 +00:00
Greg Bergé 54a797a0b1 Nested list support (#2562) 2024-10-31 14:02:42 +01:00
Amrit Kahlon a78c1ecb4d Bump scalar api client package (#2563) 2024-10-30 11:45:56 -07:00
Amrit Kahlon 4771c78001 Fix Scalar ApiClient routing (#2561) 2024-10-28 12:38:18 -07:00
Samy Pessé b7a5106f36 Disable logs for cache-do (#2560) 2024-10-27 08:16:56 -04:00
Samy Pessé 4bcbdc50ff Output caching headers on RSC/prefetch responses (#2559) 2024-10-26 10:57:52 +02:00
Brett Jephson 5d72b35c7f Improve animation of section tabs (#2553) 2024-10-25 14:00:27 +01:00
Amrit Kahlon ff50ac215c Bump @scalar/api-client-react version (#2555)
Co-authored-by: taranvohra <taranvohra@outlook.com>
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-10-25 12:06:49 +05:30
Samy Pessé 3fe3809416 Version Packages (#2415)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-24 15:54:23 +02:00
Samy Pessé 363d337a72 Cleanup GitHub workflows (#2554) 2024-10-24 14:50:39 +02:00
Amrit Kahlon f89b31c940 Upgrade to the new scalar client (#2539)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-10-24 14:40:33 +02:00
Samy Pessé 630c3e84dd Migrate to cloudflare/wrangler-action for deployment (#2549) 2024-10-24 14:30:13 +02:00
Samy Pessé d43202f137 Reduce bundle size of shiki (#2551) 2024-10-24 10:16:56 +02:00
Scott Cazan 0964043489 Use updated endpoint for page feedbacks (#2548) 2024-10-24 10:16:46 +02:00
Taran Vohra e9b31a545d Unify section tab styles with page item styles (#2552) 2024-10-24 13:28:15 +05:30
Greg Bergé 7f28a88374 Use transparent bg for secondary button (#2545) 2024-10-24 06:51:39 +02:00
Steven H 07ea45bf84 Remove deprecated synced block from GitBook Open (#2546) 2024-10-23 15:45:31 +01:00
Zeno Kapitein a86d35f721 Fixes variant selector for sites without variants (#2544) 2024-10-22 17:22:07 +02:00
Zeno Kapitein d6c28a0ff6 Update header styling of sections, variant selector, and button links (#2543) 2024-10-22 16:58:27 +02:00
Brett Jephson a7af3ca7bc Improving the new tabs (#2537) 2024-10-21 19:15:22 +01:00
Taran Vohra cda08a9843 Add support for search in a sections site (#2541) 2024-10-21 15:54:29 +05:30
Taran Vohra 7588774237 add all mode while searching site content (#2540) 2024-10-21 12:13:00 +05:30
Greg Bergé 683373b263 Fix CLS and others (#2536) 2024-10-20 12:55:37 +02:00
spastorelli 673ec8fb5d Update Placeholder ad & Sponsored by GitBook links (#2538) 2024-10-19 08:51:22 +02:00
spastorelli 63bacaa671 Ensure pending or in-review sites still get placeholder ads even without preview query param (#2535) 2024-10-18 17:08:54 +02:00
Samy Pessé e3a3d6a505 Improve perf perception and fix flickering in Ask answer (#2534) 2024-10-18 15:53:57 +02:00
Taran Vohra 175171dda1 Add siteSectionId to lookup result (#2533) 2024-10-18 16:53:15 +05:30
Taran Vohra a4b63b88c8 generate upto URL with 4 segments to support sites with sections (#2532) 2024-10-18 16:34:25 +05:30
Steven H c3675fdfe7 Add support for reusable content (#2531) 2024-10-18 10:59:46 +01:00
Brett Jephson 2fa08519b6 RND-5227: Site section tabs (#2530) 2024-10-18 09:47:53 +01:00
spastorelli 065627060b Show placeholder ad when site ads status is pending or in-review (#2529) 2024-10-17 19:20:34 +02:00
Greg Bergé 2982b6a808 Implement Stepper (#2528) 2024-10-17 09:52:45 +02:00
Greg Bergé c3f56ecd40 Return null if block not handled (#2527) 2024-10-16 22:12:54 +02:00
Zeno Kapitein fe9e6c1afd Update ogimage with new design (#2517)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-10-15 17:28:37 +02:00
Taran Vohra 73394ae929 Mock data for getSpaceCustomization and getSpaceIntegrationScripts (#2522) 2024-10-15 15:40:05 +05:30
Zeno Kapitein c754fc9ff4 Add automatic color contrast in site header, restyle search button (#2512) 2024-10-15 11:05:25 +02:00
Zeno Kapitein 1ca6208057 Update Playwright test for share links (#2523) 2024-10-15 10:53:58 +02:00
Greg Bergé cdfae4d4df Remove custom types for HeaderLink (#2521) 2024-10-14 13:33:01 +02:00
Samy Pessé c3da5469ca Add basic support for computed pages types (#2520) 2024-10-14 10:04:12 +02:00
Taran Vohra 79f2d8ba76 Refactor getContentPointer usage into getSiteContentPointer (#2519) 2024-10-14 12:07:14 +05:30
Taran Vohra 7b1bdb92a6 Remove getContentPointer usage from search (#2516) 2024-10-14 10:26:14 +05:30
Taran Vohra f9a075eed1 add support for sites in multi id mode (#2514) 2024-10-11 15:23:38 +05:30
Greg Bergé 32e4193557 Implement header link style (#2513) 2024-10-09 15:25:47 +02:00
Zeno Kapitein 133c3e7c0a Update Checkbox component (#2511) 2024-10-08 11:02:51 +02:00
Samy Pessé 6ce3cea682 Stop using KV cache backend for now, but also improves it for higher performances (#2510) 2024-10-03 15:46:58 +02:00
Greg Bergé 250e77d18b Fix synced blocks display (#2508) 2024-10-03 10:30:21 +02:00
Addison e3bfe006e9 Add badges section to readme (#2507) 2024-10-02 18:15:37 +09:00
Taran Vohra 76aeecdc68 Remove /v/ from e2e tests (#2505) 2024-10-01 12:04:08 +05:30
Samy Pessé 15d2ee3e76 Show captions for file blocks (#2506) 2024-09-30 17:54:25 +02:00
Taran Vohra b066db479f Bump the cache key for api.getPublishedContentByUrl (#2502) 2024-09-30 15:04:30 +02:00
Samy Pessé a69ff2789a Fix locationHint not being passed when purging the cache (#2504) 2024-09-30 14:45:17 +02:00
Taran Vohra 4df235d64a Add more visitor auth cookie combinations with /v/ for backwards compatibility (#2503) 2024-09-30 17:33:33 +05:30
Taran Vohra 11524457e3 URL alternative resolution criteria (#2497) 2024-09-30 14:18:44 +05:30
Addison 8f7364293e Update Documented on GB badge from encoded to uploaded icon (#2501) 2024-09-30 15:44:45 +08:00
Samy Pessé 56f5fa1fbe Lower usage of KV cache to 30% of tags (#2500) 2024-09-29 10:31:27 +02:00
Samy Pessé b075f0f7e9 Switch to aria-current="page" for the TOC items (#2499) 2024-09-27 12:54:11 +02:00
Samy Pessé 0ca32afe8d Lower usage of KV cache to 60% of tags (#2498) 2024-09-27 11:46:15 +02:00
Samy Pessé 32c2f257a9 Lower usage of KV cache to 80% of tags (#2496) 2024-09-26 19:28:25 +02:00
Brett Jephson a7066ccbe1 Fix: mobile navigation scroll (#2486)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-09-26 14:42:09 +01:00
Taran Vohra 09248e0efe Revert "generate upto URL with 3 segments to support the new site url format" (#2494) 2024-09-26 18:29:01 +05:30
Taran Vohra e2ef22fc5f generate upto URL with 3 segments to support the new site url format (#2493)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-09-26 17:16:22 +05:30
Samy Pessé 75f825e4f8 Disable KV cache for 5% of the cache tags (#2490) 2024-09-26 10:23:25 +02:00
Samy Pessé 9b8d5198e4 Experiment with lower DO billable duration by using direct RPC methods (#2492) 2024-09-25 23:57:43 +02:00
Samy Pessé e09f747727 Refresh change request cache when click refresh button (#2489) 2024-09-25 16:15:42 +02:00
Samy Pessé 16e6171750 Cache embeds for faster rendering (#2488) 2024-09-25 13:33:40 +02:00
Samy Pessé f885e887ea Improve change request previews: consistency and toolbar (#2487) 2024-09-25 12:54:15 +02:00
Samy Pessé 5096f7fbc5 Disable KV cache for docs.gitbook.com and change requests (#2485) 2024-09-25 11:53:53 +02:00
Brett Jephson f16560c1ee Scroll offset (#2484) 2024-09-25 08:52:44 +01:00
Samy Pessé d0f4860759 Refresh icons urls to purge cache of 500 (#2483) 2024-09-24 18:16:35 +02:00
Samy Pessé 34d36c6de1 Fix next-on-pages configuration for ~gitbook/static (#2482) 2024-09-24 17:25:58 +02:00
Brett Jephson 042b850b5d RND-2147: automatically scroll TOC (#2478) 2024-09-24 16:24:55 +01:00
Samy Pessé 73892f4fc2 Fix release preview CI workflow (#2481) 2024-09-24 13:13:45 +02:00
Samy Pessé 636b868bf1 Experimental new cache backend powered by DO (#2479)
Co-authored-by: Johan Preynat <johan.preynat@gmail.com>
2024-09-24 12:55:49 +02:00
Addison b144368e3f Update Dutch "Ask or Search" terminology to fit on one line (#2480) 2024-09-24 16:30:30 +09:00
Scott Cazan 683b4193d1 Don't use customized site title for space in search selector (#2367) 2024-09-23 12:43:03 +02:00
Samy Pessé f4c953665a Optimize layout shift while transitioning between pages with full width blocks (#2477) 2024-09-23 06:19:49 +02:00
Samy Pessé 0f990c772a Show definition title when visible in cards (#2476) 2024-09-22 19:04:23 +02:00
Samy Pessé 0bf985af61 Don't show hidden pages in the empty state of a page (#2475) 2024-09-19 15:17:13 +02:00
Samy Pessé 42473611d3 Add required query parameters to the code sample (#2474) 2024-09-19 14:31:22 +02:00
Samy Pessé 2c437f7d94 Fix linking to tabs itself (#2473) 2024-09-19 10:52:34 +02:00
vibhanshub aa8c49eb0c Display pattern if available in OpenAPI params (#2461)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-09-19 09:59:10 +02:00
Samy Pessé b32e40c72a Persist state of tabs and dynamically sync them based on title (#2472) 2024-09-19 09:40:54 +02:00
Samy Pessé 2ff7ed1b52 Hide button on mobile to open toc if disabled at the page level (#2471) 2024-09-18 19:49:02 +02:00
Samy Pessé bfbed1a69b Use translation for "Sponsored via GitBook" (#2469) 2024-09-17 13:41:53 +02:00
Samy Pessé ef9d012be9 Fix generation of icons package and add task "clean" (#2470) 2024-09-17 13:41:18 +02:00
Nichlas f12a2155c0 Added the Norwegian language (#2467)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-09-17 12:15:21 +02:00
Taran Vohra 43f696c4a8 use samesite none for tracking cookie (#2299) 2024-09-17 11:57:28 +05:30
Samy Pessé 4c19014dcd Prevent robots indexation for pages where it's disabled (#2464) 2024-09-13 13:52:15 +02:00
Samy Pessé 0e7f9d6778 Fix TS error when adding support for a locale not yet supported by API (#2465) 2024-09-13 10:30:20 +02:00
Rens Reinders 00a0bf3c1b Add Dutch Locale support (#2450) 2024-09-13 10:12:44 +02:00
Brett Jephson e9149036f6 RND-3387: synchronize response tabs (#2457)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-09-12 11:01:29 +01:00
Addison b6a9967959 Update search/ask wording for Japanese localization to fit UI better (#2462) 2024-09-12 09:58:58 +02:00
Addison 8bbc3caf3e Update Readme & Contributing Guide (#2459) 2024-09-09 15:28:19 +02:00
Samy Pessé 237b703a6c Fix crash in OpenAPI block because of undefined examples (#2458) 2024-09-06 16:55:04 +02:00
vibhanshub cf3045a718 Add Python support in code samples (#2453) 2024-09-06 14:29:50 +01:00
vibhanshub a679e7283f Render mandatory headers in the code sample (#2445) 2024-09-06 13:24:52 +01:00
Samy Pessé 13c75341e2 Use ellipsis and fix icon color for more links in the header on small screen (#2455) 2024-09-06 11:57:42 +02:00
Marc Laventure 4cbcc5bb20 fix: rollback scalar (#2454)
Co-authored-by: Brett Jephson <brett@gitbook.io>
2024-09-06 10:32:33 +01:00
Brett Jephson 51955dae3b Response examples with status code tabs (#2448) 2024-09-06 09:35:43 +01:00
Brett Jephson 51fa3ab2c8 Use content-visibility on open api operations (#2451) 2024-09-05 17:21:42 +01:00
Samy Pessé af9e66e87e Only display spaces dropdown in compact header when site is multi-variants (#2447) 2024-09-03 19:49:05 +02:00
Samy Pessé 8878dc7f80 Accept special ip headers from gitbook backend (#2446) 2024-09-03 16:47:51 +02:00
Scott Cazan 4336bc20e0 Filter out short searches less then 2 chars, bigger debounce (#2440) 2024-09-03 14:49:35 +02:00
Samy Pessé 4a7613a521 Fix community ads fetching (#2444) 2024-09-03 13:54:31 +02:00
Samy Pessé 689f55340f Fix inconsistent click area in table because of scroll indicator (#2443) 2024-09-02 14:58:56 +02:00
Taran Vohra 160ae3d49d Add spaces dropdown to CompactHeader component (#2439) 2024-08-28 10:08:25 +05:30
Marc Laventure c079c3c6d9 chore: bump scalar package (#2421)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-08-21 08:27:22 +02:00
Samy Pessé cb782a7557 Fix running GitBook locally and fix community ad rendering (#2437) 2024-08-20 19:37:33 +02:00
Abhishek 502d8fc087 Fix typo in README.md (#2430) 2024-08-20 14:55:46 +02:00
Brett Jephson 6295881138 RND-3373: update the shadow for dark mode in multi-space search (#2436) 2024-08-20 13:54:28 +01:00
Brett Jephson 17f71ba680 RND-3113: expand when expandable anchor (#2435) 2024-08-20 11:04:00 +01:00
Brett Jephson 5fe7adb87b RND-3532: drop down menu for hidden links at small screen size (#2434) 2024-08-19 11:51:48 +01:00
spastorelli 41684d091b Revert "Automatically scroll to the active page in table of contents (#2425) (#2429) 2024-08-15 16:52:27 +02:00
spastorelli 9f6c3347cb Automatically scroll to the active page in table of contents (#2425) 2024-08-15 11:42:48 +02:00
Samy Pessé aa321989c4 Use a <div> instead of <h1> in the top header (#2428) 2024-08-14 10:02:42 +02:00
Samy Pessé 0f1565cb4b Fix mermaid / contentkit webframe not updating properly (#2427) 2024-08-13 15:26:11 +02:00
Samy Pessé 3996110ebd Optimize and resize images in community ads (#2426) 2024-08-09 15:41:35 +02:00
Samy Pessé 3422ad4c84 Iteration on community ads (#2422) 2024-08-09 12:31:36 +02:00
spastorelli 3c07e65b9a Fix paragraph top margin in quote blocks (#2423) 2024-08-09 10:58:20 +02:00
Steven H 287df91661 Add an nvmrc file (#2405) 2024-08-07 15:32:08 +01:00
Samy Pessé 776bc3135a Fix running repository without access to Pro token for @gitbook/icons (#2417)
Co-authored-by: Valentino Hudhra <2587839+valentin0h@users.noreply.github.com>
2024-08-02 18:40:44 +02:00
Samy Pessé 4638958c9f Fix preview of customization (#2418) 2024-08-02 18:24:41 +02:00
Samy Pessé 1f24fe46c4 Add support for page icons and icons style customization (#2416) 2024-08-02 17:28:32 +02:00
Valentino Hudhra ccbcab8822 Control tracking of page views with env/header variables (#2380) 2024-08-02 16:10:28 +02:00
Marc Laventure 094e9cdac2 chore: bump scalar (#2410)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-08-02 10:24:39 +02:00
Samy Pessé 5c35f36b3a Prepare @gitbook/icons package and use it as a replacement of geist/icons (#2404) 2024-08-02 09:59:44 +02:00
Steven H d7ec2b57a4 Bump getPublishedContentByUrl cache to fix a recent issue with the GitBook API (#2414) 2024-08-01 06:54:09 +01:00
Steven H 373a1e0312 Bump URL resolution caches after a recent hotfix. (#2412) 2024-07-29 14:22:20 +01:00
Taran Vohra e9fe3975bb Pass shareKey as context while fetching space (#2409) 2024-07-26 16:14:20 +05:30
Samy Pessé 32a73b55d4 Version Packages (#2403)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-25 15:12:18 +02:00
Samy Pessé 0426312d6c Reset to first tab when tabs change in an InteractiveSection (#2407) 2024-07-25 15:09:21 +02:00
Samy Pessé ede2335fb3 Fix x-codeSamples: false not working at the single operation level (#2408) 2024-07-25 14:59:30 +02:00
Amrit Kahlon 709f1a1ccb Update Scalar Api Client to new version (#2406)
Co-authored-by: marclave <marc@scalar.com>
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-07-25 10:25:50 +02:00
Samy Pessé 24b785cbfb Update shiki to fix diff code highlighting (#2338) 2024-07-25 09:33:42 +02:00
Samy Pessé acc3f2f418 Fix Scalar proxy failing on Cloudflare (#2402) 2024-07-24 11:41:35 +02:00
Scott Cazan d4a653d6a9 Use SpaceURL in getURL function to for cross-space searches (#2399) 2024-07-23 12:07:32 +02:00
Samy Pessé 7e74d25447 Version Packages (#2397)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-22 16:26:53 +02:00
Samy Pessé 3445db41ce Fix packages not including all files (#2396) 2024-07-22 16:20:06 +02:00
Samy Pessé d1bd02a6f5 Version Packages (#2395)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-22 15:43:27 +02:00
Samy Pessé 24cd72e088 Use a personal token for the changeset GitHub workflow (#2394) 2024-07-22 15:30:11 +02:00
github-actions[bot] 47f7558c38 Version Packages (#2393)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-22 15:05:57 +02:00
Samy Pessé de747b7b33 Better structure monorepo and publish JS files for react-openapi and react-math (#2392) 2024-07-22 15:02:04 +02:00
Samy Pessé 8e8b73fbd9 Publish packages as public with changeset (#2391) 2024-07-21 21:25:43 +02:00
github-actions[bot] e966e33e8f Version Packages (#2390)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-21 19:45:18 +02:00
Samy Pessé bd0ca5babd Fix @gitbook/react-openapi when react import are mandatory (#2389) 2024-07-21 19:43:50 +02:00
Samy Pessé f6bacea1ae Skip hidden pages in sitemap.xml (#2388) 2024-07-19 09:20:16 +02:00
github-actions[bot] ba2a523722 Version Packages (#2387)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-19 08:28:14 +02:00
Samy Pessé 57adb3e54a Fix publish with changeset (#2386) 2024-07-19 08:23:03 +02:00
github-actions[bot] 7377928c8a Version Packages (#2385)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-18 21:05:22 +02:00
Samy Pessé 5f8a8fe9b1 Setup Changeset to publish packages to NPM (#2384) 2024-07-18 21:00:50 +02:00
Scott Cazan 29a0bf25c4 Update Site search endpoint (#2382)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-07-18 10:36:12 +02:00
spastorelli 92bb016576 Show additional context when linking to a page group & a page in another space (#2381) 2024-07-18 10:22:15 +02:00
Samy Pessé c8810ea002 Hide pages from table of contents when set as hidden (#2383)
Co-authored-by: Scott Cazan <scottcazan@gmail.com>
2024-07-18 09:50:46 +02:00
spastorelli aa8bbaddc4 Fallback redirect to root when switching variants (#2376) 2024-07-16 09:24:31 +02:00
Samy Pessé b8c136e9c0 Fix render of one of when alternatives are primitives (#2378) 2024-07-15 10:15:42 +02:00
Samy Pessé 46d54172b0 Fix CI step to verify formatting (#2379) 2024-07-14 23:53:55 +02:00
Brett Jephson 68dc2de190 Remove Page/Space label from BlockContentRef (#2374) 2024-07-12 15:02:05 +01:00
Samy Pessé 81b372f372 Fix response example when response example is a string (#2377) 2024-07-12 10:35:22 +02:00
Scott Cazan 966e520640 Fix Source links in Ask AI not navigating to the page (#2375) 2024-07-11 15:39:28 +02:00
spastorelli 12702930ec Optimize SpacesDropdownMenuItem client side props (#2373) 2024-07-11 10:42:53 +02:00
spastorelli 6ce57bcda1 Fix issue where nav route/path is not retained when switching variants (#2372) 2024-07-10 17:10:19 +02:00
spastorelli d99b453bc4 Fix issue where published content crashes when localstorage is disabled (#2371) 2024-07-10 14:56:21 +02:00
Samy Pessé aaf5793cb7 Use schema.example if defined, even if value is falsy (#2370) 2024-07-05 16:34:48 +02:00
Samy Pessé 9b1762d2ab Fix invalid api response from carbon (#2369) 2024-07-05 15:55:35 +02:00
Samy Pessé 8d38d000fd Fix RND-4344 (#2368) 2024-07-04 17:04:35 +02:00
Scott Cazan 4cf9cdd56d Fix ToC not re-rendering when linking to a variant from SearchResults (#2366) 2024-07-03 12:22:08 +02:00
Scott Cazan 39406bbf54 Use published URL for site when displaying results for a Site space (#2364) 2024-07-02 16:14:39 +02:00
Scott Cazan 9c5c1e5b68 Show sources with no answer (#2363)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-06-28 15:25:01 +02:00
Johan Preynat 6929b0b98b Prevent SVG images to be resized and rendered on the /~gitbook/image endpoint (#2362) 2024-06-27 12:24:46 +02:00
Johan Preynat 7c26d491b1 Fix passing the correct nonce for iframely script and preload it (#2360) 2024-06-25 17:11:19 +02:00
Johan Preynat 97035a054a Tree shake unused code for Sentry (#2359) 2024-06-25 15:55:48 +02:00
Johan Preynat db45c6d773 Rework context to actually share memory cache between middleware and handlers for all requests (#2358) 2024-06-25 14:30:38 +02:00
Johan Preynat e3f5f81e62 Use fnv1a instead of SHA256 to create images signatures (#2353) 2024-06-24 13:31:18 +02:00
Johan Preynat f5df40e17d Use a singleton to store the memory cache in an internal WeakMap for the current request (#2356) 2024-06-24 11:13:03 +02:00
Johan Preynat e13c76efed Set preconnect links to main domains on render (#2354) 2024-06-21 17:02:02 +02:00
Johan Preynat 4a11d8d9eb Share memory cache between middleware and request handler (#2347) 2024-06-21 11:13:06 +02:00
spastorelli 009ed8cc6e Call trackViewInSiteById API endpoint when tracking view for sites (#2350) 2024-06-21 10:01:35 +02:00
vibhanshub 106cbbd987 Add support for examples in OpenAPI block (#2314) 2024-06-20 16:02:58 +05:30
Johan Preynat 56e5c3c3f8 Parse cache tags returned from the API set them in response (#2349) 2024-06-20 10:09:02 +02:00
Taran Vohra 1dc3234003 Fix page metadata title (#2348) 2024-06-18 20:52:12 +05:30
Johan Preynat 22dc0d4ff5 Fix passing revalidateBefore option when calling cacheResponse to ensure these go through background revalidation (#2342) 2024-06-17 17:16:12 +02:00
Taran Vohra 3a4caf062c Add getContentTitle to properly render the title for sites & legacy published content (#2343) 2024-06-17 20:28:21 +05:30
Taran Vohra 8ad0657159 Use site's share key as context while fetching site spaces (#2341) 2024-06-14 20:59:05 +05:30
Taran Vohra d8a4ecd0c6 Pass site url as context to listSiteSpaces API (#2339) 2024-06-14 10:40:18 +05:30
David Burghoff 65c7968438 Add German Locale support (#2317)
Co-authored-by: David Burghoff <david.burghoff@swot.de>
Co-authored-by: taranvohra <taranvohra@outlook.com>
2024-06-13 15:04:49 +02:00
Rodrigo Castro 3914f11150 Add Brazilian Portuguese translation (#2285)
Co-authored-by: taranvohra <taranvohra@outlook.com>
2024-06-13 14:54:47 +02:00
Addison d363908297 Add contributors to readme, bump API (#2333) 2024-06-12 15:24:18 +02:00
Greg Bergé 414556ac7a Remove cache client-side (#2337) 2024-06-10 11:17:48 +02:00
Steven H c768e9a90a Add another space to ignore list whilst we debug issues. (#2334) 2024-05-28 19:02:07 +01:00
Taran Vohra 553f1f228f Bump @gitbook/api to 0.48.0 (#2328) 2024-05-24 20:10:25 +05:30
Taran Vohra 30986528a7 bump @gitbook/api to 0.47 (#2327) 2024-05-24 19:07:54 +05:30
Steven H c70c2ddad8 Bump next-on-pages version to fix SSRF attack. (#2319) 2024-05-16 17:05:58 +01:00
Marc Laventure cf74d00758 chore: update scalar client (#2316) 2024-05-14 11:52:09 -07:00
Steven H c2256bfd14 Fix an issue where attackers could use the Nextjs image endpoint to redirect to any URL. (#2312) 2024-05-14 11:34:33 +01:00
fuyangpengqi 5d73a0f062 chore: fix some typos in README.md (#2290)
Signed-off-by: fuyangpengqi <995764973@qq.com>
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-05-13 16:22:07 +02:00
Samy Pessé 8f5f6c61f8 Setup the pull_request workflow on actions (#2311) 2024-05-13 16:10:15 +02:00
Taran Vohra 9a86965ba1 Fix VA cookie to be only set if basePaths match (#2300) 2024-05-06 21:02:48 +05:30
Scott Cazan c8d5f825fc Update GitBook trademark (#2305) 2024-05-02 12:18:02 +02:00
Steven H 5db3cbc2ce Render Embed blocks that can be handled by an integration in the Space. (#2302) 2024-04-25 15:25:53 +01:00
Steven H f8d148bec4 Use plain code highlighting on some spaces that are currently crashing. (#2301) 2024-04-25 09:50:08 +01:00
Steven H 198dd9f158 Investigate an issue where images with 127.0.0.1 in the URL are not correctly resolved. (#2298) 2024-04-19 17:21:22 +01:00
Steven H 2b63bc158a Improve rendering of File column in tables. (#2297) 2024-04-19 16:58:46 +01:00
spastorelli 4a8097d968 Use site space context from token in multi-id mode when provided (#2295) 2024-04-19 16:51:12 +02:00
spastorelli f1440ca7ef Fix preview crashing when token do not include site data (#2292) 2024-04-18 17:36:16 +02:00
Taran Vohra 7ef2eeed13 fix site cache tag to exclude org id (#2291) 2024-04-18 20:28:39 +05:30
Taran Vohra 4005895337 Fix previews for sites in multi-id mode (#2289) 2024-04-18 18:19:52 +05:30
Steven H bf450e5cc7 Support GitHub-flavoured Markdown when parsing OpenAPI descriptions. (#2288) 2024-04-17 14:21:07 +01:00
Taran Vohra 4c12722c0a Use appropriate customization settings for sites (#2279) 2024-04-17 17:28:14 +05:30
Taran Vohra ac124a7ea5 Add e2e tests for site variants (#2286) 2024-04-16 20:59:58 +05:30
spastorelli 1de25056fa Fix space dropdown showing for single variant sites and update E2E tests (#2284) 2024-04-16 15:29:15 +02:00
Steven H bf3d2032ab Avoid crashing Cloudflare Worker when syntax highlighting too many lines of code. (#2283) 2024-04-15 11:57:22 +01:00
spastorelli bfb2342ab3 Add support for integration inject script for sites (#2277) 2024-04-11 10:28:24 +02:00
Samy Pessé 76cbc3c10f Print signature and url when having error with image resizing (#2275) 2024-04-09 11:22:36 +02:00
Taran Vohra c80c76d50d Override site's spaces published URLs (#2274) 2024-04-09 09:59:25 +05:30
Johan Preynat 263c89391e Add HSTS and other security headers (#2271) 2024-04-08 19:44:57 +02:00
Samy Pessé ebf742e81a Use a sampleRate of 0.1 for edge/node runtimes (#2273) 2024-04-08 15:05:01 +02:00
Samy Pessé 685317f508 Fix full-width for code-blocks and embeds (#2272) 2024-04-08 14:45:42 +02:00
Taran Vohra 0c224861e3 Sites support (#2262) 2024-04-08 17:06:22 +05:30
Steven H a007604ab1 Bump caches for documents. (#2265) 2024-04-04 14:09:43 +02:00
Steven H 3076e96061 Fix an issue where OpenAPI blocks could not be fetched. (#2267) 2024-04-04 12:28:30 +02:00
Steven H a3741dd65f Bump caches for revisions. (#2263) 2024-04-04 11:15:29 +02:00
Taran Vohra 07085a5b89 Set tracking prompt cookie age to 365days instead of a session cookie (#2266) 2024-04-04 14:39:27 +05:30
Samy Pessé 36600bc0c7 Fix styling for cards when no cover is defined (#2261) 2024-04-03 00:10:59 +02:00
Samy Pessé 5b7488b066 Handle ?theme query string to force theme in preview mode (#2260) 2024-04-02 13:55:27 +02:00
Samy Pessé c1ef7f2782 Fix display of parameter's description in OpenAPI block (#2258) 2024-04-02 00:35:59 +02:00
Samy Pessé f26ab0cf80 Remove mask on page cover (#2257) 2024-04-02 00:21:21 +02:00
Samy Pessé 7c570a008e Use a sample rate of 10% for Sentry errors (#2256) 2024-04-01 23:07:43 +02:00
Samy Pessé 1d71d85ed7 Don't test redirect on path that are longer than 512 (#2255) 2024-04-01 02:49:48 +02:00
Samy Pessé 4f728c0137 Fix parsing of Swagger 2.0 when it can be patched (#2254) 2024-03-31 20:13:34 +02:00
Samy Pessé 844a3e1845 Fix search in collection spaces leading to invalid urls (#2253) 2024-03-31 18:03:24 +02:00
Steven H 3144b2fec1 Update SyncedBlocks to use new API (#2251) 2024-03-29 15:57:08 +00:00
Samy Pessé 5805c24255 Fix copy for code blocks in OpenAPI or AI answers (#2250) 2024-03-28 22:46:29 +01:00
Samy Pessé d0ef225ea3 Make click on OpenAPI property name selects the entire text (#2249) 2024-03-28 22:44:03 +01:00
Samy Pessé 5f1d82cb5a Fix rendering of select in cards (#2248) 2024-03-28 20:53:01 +01:00
Samy Pessé 0894a740ff Fix crash when "required" is not an array in OpenAPI schemas (#2247) 2024-03-28 17:03:30 +01:00
Samy Pessé 14012d92f9 Fix cover image overflowing the card (#2243) 2024-03-27 18:20:16 +01:00
Samy Pessé 4be6eada62 Fix redirect to right page for content redirects (#2241) 2024-03-26 23:30:47 +01:00
Samy Pessé 0ddbe5c0ee Revert crossOrigin="anonymous" for images (#2240) 2024-03-26 23:19:20 +01:00
Samy Pessé 3a7864d731 Fix design of embed cards being centered (#2239) 2024-03-26 18:29:52 +01:00
Samy Pessé 73d806a796 Set z-index on annotation popover (#2238) 2024-03-26 16:46:19 +01:00
Samy Pessé d40568c8f4 Fix OpenAPI tag in aside when text is long (#2237) 2024-03-26 14:02:17 +01:00
Samy Pessé a6789513dc Fix alignment and border around small images in a grid with captions (#2229) 2024-03-26 13:45:23 +01:00
Samy Pessé ee7a74fe43 Fix VA redirects for nested paths (#2236) 2024-03-26 11:53:32 +01:00
Samy Pessé 0d99906774 Fix crash with concurrent loading of shiki syntaxes (#2235) 2024-03-26 11:30:38 +01:00
Greg Bergé d3f9131af4 Support images & files in synced blocks (#2234) 2024-03-25 21:53:24 +01:00
Addison 30bae7c877 Add legacy references to readme (#2233) 2024-03-25 13:49:39 +01:00
Samy Pessé 0c99a57b3c Also fix crossOrigin for images when zooming it (#2232) 2024-03-25 13:43:19 +01:00
Samy Pessé ad9e8f2232 Fix authentication displayed for images (#2231) 2024-03-25 13:15:19 +01:00
Greg Bergé 4c286b503c Fix fullPage screenshots (#2230) 2024-03-25 12:43:50 +01:00
Samy Pessé c5a28f884a Fix zoom on small images with custom zoom component (#2228) 2024-03-25 11:31:40 +01:00
Samy Pessé 2ed5445af8 Fix display of cover when TOC is hidden (#328)
* Add visual tests for page options

* Fix the case of a landing page

* Fix height of the aside when page has a cover

* Remove some visual tests
2024-03-22 23:46:35 +01:00
Samy Pessé 755291d1b7 Fix redirect for uppercased pathnames and fix og:image for collections (#327)
* Fix redirect for uppercased pathnames

* Try fixing it

* Try without metadataBase

* New try

* Fix it

* Try to fix og:image

* Generate canonical URL meta tag
2024-03-22 22:23:11 +01:00
Samy Pessé 7421d1c6c3 Cache getPublishedContentByUrl by tags (#326)
* Cache getPublishedContentByUrl by tags

* Reduce amount of cases returned by getURLLookupAlternatives

* Optimize lookup even more for revisions / change-requests

* Fix basePath for revisions / crs
2024-03-22 21:10:58 +01:00
Samy Pessé ff773233dd Prevent click on images in links to zoom it (#324)
* Prevent click on images in links to zoom it

* Fix TS
2024-03-22 16:56:08 +01:00
Samy Pessé 44983f8495 Minor perf improvements to code block highlighting (#323)
* Use a singleton map when loading languages

* typing

* Lint

* Remove one trace
2024-03-22 16:43:22 +01:00
Viktor Renkema 435ccb10ce Fix tab truncation behaviour (#322) 2024-03-22 12:18:49 +01:00
Amrit Kahlon ef8eb72364 fix: clear scalar api client response on close (#318)
* fix: clear scalar api client response on close

* bun install

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-03-21 14:53:29 +01:00
Samy Pessé 2a28f28421 Fix some links opening in new tab and links on blankslate (#321)
* Open links from TOC in same tab

* Fix page blankslate not resolving page links correctly
2024-03-21 14:11:42 +01:00
Samy Pessé be45f23cc8 Use whitespace-pre to fix whitespace in highlighted text in search (#320)
* Use whitespace-pre to fix whitespace in highlighted text in search

* Correctly fix it
2024-03-21 13:10:58 +01:00
Brett Jephson fff6dce8fc RND-3192: images expanding card content beyond their width (#281)
* Fix for RND-3192: images expanding card content beyond their width

* Wrap Image in a size-restricting container

---------

Co-authored-by: Viktor Renkema <vrenkema@gmail.com>
2024-03-21 12:46:46 +01:00
Samy Pessé cfcfbdf16c Fix text/image alignment in cards (#319)
* Add a visual test

* Fix test
2024-03-21 12:15:58 +01:00
Samy Pessé b029b1e23d Fix display of advanced blocks in OL/Tasks lists (#317)
* Fix OL list style

* Format

* Fix it for tasks lists as well

* Default to fullPage

* Run some test without fullPage

* Run fullPage only on list
2024-03-21 09:50:18 +01:00
Samy Pessé 1dc81fc56a Use absolute URLs in sitemap.xml (#316) 2024-03-20 23:58:57 +01:00
Samy Pessé 31799038dd Improve rendering of complex emojis in favicon (#315)
* Improve rendering of complex emojis in favicon

* Lint
2024-03-20 19:25:42 +01:00
Samy Pessé db4ecbc747 Fix long words in headings breaking the layout (#314) 2024-03-20 18:59:52 +01:00
Samy Pessé 0ad7bf561e Let users extend the limit of PDF generation (#313)
* Add link to extend PDF generation limit

* Translate

* Use variable
2024-03-20 18:49:28 +01:00
Samy Pessé dc2d50e455 Iterate over all keys in KV when purging cache instead of just first page (#312)
* Iterate over all keys in KV when purging cache instead of just first key

* Call getTagPrefix once
2024-03-20 18:48:17 +01:00
Addison 10fc27ba4e Add README, License & Contributing Guide (#153)
* Initial commit, format

* Use codeblocks instead of inline code

* Add header

* Add badge, update placeholder for hero image

* Update badges and structure

* Add license

* Update badges

* Add contributing guide

* Add deployment guide

* Add license section

* Update header image

* Add image of deployed site

* Update readme

* remove deployment buttons

* formatting

* Add types of contributions

* format

* Add review suggestions

* Update badges
2024-03-20 17:26:44 +01:00
Samy Pessé 2e6e96728c Fix logic to parse changeRequest URL in multi-id mode (#311) 2024-03-20 16:50:55 +01:00
Samy Pessé e1de340fc5 Support URL routes to export PDF for a change-request / revision (#310)
* Support more URL patterns for "multi-id" mode

* Format
2024-03-20 15:43:29 +01:00
Samy Pessé fc9238498d Only use GITBOOK_TOKEN when request is using default API (#309)
* Only use GITBOOK_TOKEN when request is using default API

* Format
2024-03-20 10:40:38 +01:00
Samy Pessé 2420f9b730 Return private cache-control when receiving prefetch request (#308) 2024-03-20 00:17:59 +01:00
Samy Pessé d12aad6867 Fix different flickering when navigating in docs (#307)
* Prevent scroll flickering when switching between page with scroll and no scroll

* Oups

* Remove id

* Apply only on large device and use variable

* Fix default
2024-03-19 20:51:16 +01:00
Samy Pessé 37be6f3164 Support options in the OpenAPI spec to control the look and feel (#306)
* Don't show code-samples if x-codeSamples is defined

* Support x-hideTryItPanel to hide "Try it"

* Fix display of code samples
2024-03-19 16:32:15 +01:00
Marc Laventure 4f039ecb2b feat: add scalar api client (#180)
* wip

* feat: add scalar api client

* fix: pr feedback

* feat: add scalar react client package, remove vueary

* feat: add scalar proxy

* Move dependencies to package

* Format once

* Rename prop

* Use react context and simplify lazy loading

* Add loading state

* Format

* Move styles

* bun install

* bun

* fix: remove extraneous api-reference package

* feat: make operation functional with spec in client

* fix: column bug and http request type wrapping

* fix: add scalar api reference package

* Format

* bun install

* fix: scrolling in scalar modal

* Lazy load operations data in component

* fix: change dependency from api-reference to oas-utils to reduce size

* bun install

* Log error in the worker proxy

* Cleanup

* Comment "mode"

* Without credentials and referrerPolicy

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
Co-authored-by: Amrit <amrit@hockey-community.com>
2024-03-19 15:32:54 +01:00
Samy Pessé 71e993d0ca Fix support for page redirects with uppercases (#305) 2024-03-19 14:37:45 +01:00
Samy Pessé 6695de7b79 Fix inline math not displayed with KaTeX (#304)
* Fix mathjax loading

* Fix inline math not being displayed

* Format
2024-03-19 12:39:53 +01:00
Samy Pessé cf958bacd1 Fallback to MathJax when KaTeX fails to compile math (#303)
* Start

* Use MathJax v3

* Format

* Improve font-size

* Lint

* Better handle loading

* Copy MathJax assets to public folder

* Attempt at using local assets for MathJax

* Use bun 1.0.31

* Try with bun 1.0.33

* Try fixing headers

* Simplify

* Simplify and not use suspense module

* Cleanup more

* Add test for Math

* Make math block scroll if needed

* Update packages/react-math/src/KaTeX.tsx

Co-authored-by: Greg Bergé <berge.greg@gmail.com>

* Use React.use

* Format

* Use exports

* Lint

* Disable cache in CI for lint

* Format

---------

Co-authored-by: Greg Bergé <berge.greg@gmail.com>
2024-03-19 11:34:53 +01:00
Samy Pessé 85a32fda4f Wrap RocketLoaderDetector in DOMContentLoaded (#302) 2024-03-18 19:35:31 +01:00
Samy Pessé 706aa42a6e Fix RocketLoaderDetector being encoded (#301)
* Fix RocketLoaderDetector being encoded

* suppressHydrationWarning

* Show alert at the top of the page
2024-03-18 19:14:54 +01:00
Samy Pessé 4dcca8b3ec Pass the nonce to the RocketLoaderDetector (#300) 2024-03-18 18:42:56 +01:00
Samy Pessé d0b92dd408 Improve text displayed in mention for anchor content refs (#287)
* Resolve anchor content reference to the block text for mentions

* Only apply it for mentions/etc, where text is needed

* Handle tabs/expandable

* Rename to resolveAnchorText
2024-03-18 18:16:53 +01:00
Greg Bergé 718452728f Detect Rocket Loader and advert about it on docs (#295) 2024-03-18 17:33:26 +01:00
Greg Bergé 9b6d34bdbc Remove screenshot from AI result (#298)
Not possible to have it stable
2024-03-18 15:53:41 +01:00
Greg Bergé 3c96bf84b5 Upgrade Argos (#296)
* Upgrade Argos

* Wait for cookie dialog, avoid fullPage if not needed

* Fix E2E

* Cookies dialog
2024-03-18 15:30:45 +01:00
Greg Bergé cc4a86cc23 Fix ordered list display (#294)
* Fix ordered list display

* Cover lists in E2E
2024-03-18 15:26:43 +01:00
Greg Bergé c87197bb98 Replace shikiji by shiki (#297) 2024-03-18 15:11:22 +01:00
Valentino Hudhra 69dcf75083 Align loading skeleton with content (#288) 2024-03-18 14:48:40 +01:00
Samy Pessé 66dcaf850f Ignore all errors for rendering integration blocks (#293) 2024-03-18 12:08:49 +01:00
Greg Bergé 5f70ed73b9 Fix page cover display (#291)
* Fix page cover display

Make it always looks good with the recommended size of 1990x480.

* Take maximum size on mobile

* Stabilize visual testing
2024-03-18 11:04:28 +01:00
Samy Pessé bda3080b94 Don't show "Last updated" when no createdAt/updatedAt (#292) 2024-03-18 10:09:05 +01:00
Samy Pessé 9f5c68acfe Fix passing ref to Link elements to make enter in search works (#290) 2024-03-18 09:41:15 +01:00
Samy Pessé df92c72164 Fix resolution of first page document when content starts with empty group (#289)
* Fix resolution of first page document when content starts with empty group

* Lint
2024-03-18 09:23:23 +01:00
Samy Pessé a27fa68ae6 Fix scroll to hash and update next to 14.1.3 (#286)
* Update next to 14.1.3

* Scroll to hash when url changes

* Simplify tests

* Lint and format

* Fix TS

* Dummy comment

* Try async function
2024-03-18 08:55:30 +01:00
Samy Pessé 9e8cde48d4 Fix URL.canParse failing on some browsers (#285)
* Fix call to URL.canParse failing on some browsers

* format
2024-03-15 21:04:05 +01:00
Steven H 9f75929269 Fix an issue where following a link to a different space would not update the ToC or header. (#284)
* Fix an issue where clicking links to other spaces would not update ToC/header

* Fix

* Remove dev text

* Use URL.CanParse for testing the external url

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-03-15 20:09:29 +01:00
Samy Pessé 5c7c17fe02 Fix OpenAPI parsing for Swagger 2.0 YAML anchors (#282) 2024-03-15 18:09:44 +01:00
Johan Preynat 66506143ef Redirect uppercase pages path to lowercase (#273)
* Redirect to lowercase pathname when page path has uppercase

* Also redirect in generateMetadata

* Rollback changes in middleware normalizeURL

* Improve argument type

* Only redirect in page component
2024-03-15 17:01:45 +01:00
Greg Bergé 50346135f9 Refactor image sizing logic (#278)
Fix RND-3140
2024-03-15 16:21:03 +01:00
Steven H f98146f5b6 Show a single page when user clicks Export as PDF (#279) 2024-03-15 15:08:41 +00:00
Steven H 88a7ab21a2 Revert a change in the way we await for local caches to update. (#277) 2024-03-15 14:03:00 +00:00
Steven H a4099dff9e Remove awaiting for local caches to set their values whilst we investigate hanging pages. (#275) 2024-03-15 13:47:31 +00:00
Steven H 98f91d9e82 Reduce local caches to 30s (#274) 2024-03-15 13:34:52 +00:00
Greg Bergé 4c2625c277 Fix memory cache usage, use the same value of 1 min for non immutable in local cache (#272) 2024-03-15 12:37:27 +01:00
Greg Bergé 77b6228677 Fix an issue where we were caching mutable cache entries indefinitely. (#270) 2024-03-15 11:22:15 +00:00
Johan Preynat ff93689d4e Rollbacking lowercasing paths since it breaks share links... (#271) 2024-03-15 12:01:58 +01:00
Steven H d8ffa5d69c Fix an issue where parsing an OpenAPI schema without securitySchemas would crash the page. (#263) 2024-03-15 10:27:23 +00:00
Samy Pessé f77b2b6cd7 Fix resolution of content-refs to pages in another space (#267)
* Fix resolution of content-refs to pages in another space

* Fix title of the content ref
2024-03-15 11:25:23 +01:00
Sebastian Graz 5dec1a1f0e Top links visibility container queries (#257)
* improve top link vis queries & footer style fixes

* add ellipsis to menu items

* Add spacing to menu items

* Remove weird shadow

* Format

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-03-15 11:24:47 +01:00
Johan Preynat e462ac837e Redirect URLs containing uppercase characters to lowercase (#266)
* Add tests for normalizeURL

* Redirect requests containing uppercase in pathname to lowercase via normalizeURL

* Fix typo
2024-03-15 11:24:41 +01:00
Taran Vohra a21673e4c1 use sameSite: none for va cookie (#265)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-03-15 15:52:10 +05:30
Johan Preynat c6537422a4 Use bun 1.0.30 for now in CI (#269) 2024-03-15 11:03:37 +01:00
Johan Preynat 654a9e6227 Increase getDocument timeout to 20s to prevent failing while the API is normalizing documents (#264) 2024-03-14 20:35:00 +01:00
Steven H 80d45c3ff7 Force light mode when exporting PDF. (#242) 2024-03-14 16:40:49 +00:00
Steven H 8c75bd364b Revert "Add w-full to consider Cards block (#261)" (#262)
This reverts commit 06b94d4525.
2024-03-14 15:42:06 +00:00
Viktor Renkema 06b94d4525 Add w-full to consider Cards block (#261) 2024-03-14 15:55:25 +01:00
Steven H e5a9d16d7e Mitigate long loading times on spaces with many files. (#260) 2024-03-14 11:41:11 +00:00
Samy Pessé d0eebceacf Batch request for getRevisionFile to avoid too many sub-requests (#259)
* Try approach with batching

* Improve it to support getRevision

* Fix

* Real fix

* Implement skip

* Lint
2024-03-13 18:10:07 +01:00
Steven H ee3221885c Remove Sentry trace/transaction (#258) 2024-03-13 16:35:18 +00:00
Greg Bergé 76dbf0f0d3 Tag synced block in API (#256) 2024-03-13 15:32:52 +01:00
Scott Cazan fc11ffdc8b Don't try to render responses if none are defined by the user (#255)
* don't try to parse responses if none are defined

* don't try to render responses if none exists

* move logic back into component
2024-03-13 14:37:21 +01:00
Steven H 9f83b0e783 Fix an issue where an incorrect cache key was used for revisions and pages, causing 404s and 500s. (#254) 2024-03-13 13:20:57 +00:00
Samy Pessé b0a9361cbd Disable redis cache (#253) 2024-03-13 13:36:38 +01:00
Samy Pessé e34b923e4a Correctly handle errors in blockFallback when inputs are running (#249)
* Correctly handle errors in blockFallback when inputs are running

* Format

* Fix case of steven
2024-03-13 12:54:49 +01:00
Samy Pessé cf4b1249a9 Optimize performances for reading revisions (#251)
* Optimize read of revisions with metadata=false when possible

* Format

* Fix

* Update src/components/AdminToolbar/AdminToolbar.tsx

Co-authored-by: Steven H <shne24@gmail.com>

---------

Co-authored-by: Steven H <shne24@gmail.com>
2024-03-13 12:54:32 +01:00
Samy Pessé 221d85cc4d Optimize caching of revisions/documents (immutable entries) in memory and cloudflare cache (#252)
* Better handle immutable cache entries in memory/cf-cache

* Format

* Update src/lib/cache/utils.ts

Co-authored-by: Steven H <shne24@gmail.com>

---------

Co-authored-by: Steven H <shne24@gmail.com>
2024-03-13 12:54:22 +01:00
Scott Cazan 658eb4d13f extra check for undefined in schema.items (#250) 2024-03-13 12:24:10 +01:00
Samy Pessé 3725239e92 Skip data: images for image resizing (#248) 2024-03-13 11:36:06 +01:00
Samy Pessé bdbd14c560 Fix next edge runtime not liking error in logs (#247)
* Fix next edge runtime not liking error in logs

* Fix other errors
2024-03-13 11:04:43 +01:00
Taran Vohra 0da4e9a926 Fix visitor auth logic by testing multiple basePaths (#239)
* WIP

* add search params to target in multi-path

* Simplify

* Format

* Ensure trailing slash

* Add unit test

* fix lint

* use search from target in redirect

* remove unused import

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-03-13 13:54:47 +05:30
Taran Vohra 1eb4bff09b Strip url search params when comparing in lookupSpaceByAPI (#246)
* strip url search while comparison in lookupSpaceByAPI

* strip URL search for the lookupURL
2024-03-13 13:44:44 +05:30
Samy Pessé 147719c19b Fix testing of VA in local development (#245) 2024-03-13 09:02:35 +01:00
Samy Pessé c13f676ea8 Fix content references to other spaces (#243) 2024-03-12 20:43:07 +01:00
Samy Pessé d326822b9d Pass token to getPublishedContentByUrl to ensure rate-limit settings are propagated (#244) 2024-03-12 20:33:28 +01:00
Samy Pessé 111ec45357 Fix env variable used for API token (#241) 2024-03-12 18:12:49 +01:00
Steven H e39e1db484 Fix an issue where track_view was failing. (#240) 2024-03-12 15:53:58 +00:00
Samy Pessé 6849df49ec Fix error with primary revision being fetched instead of specific one (#236) 2024-03-12 12:03:13 +01:00
Steven H a697dc4fcd Fix an error where a Theme nonce value could cause inconsistencies between server- and client-side rendering. (#237) 2024-03-12 10:09:14 +00:00
Samy Pessé a8d15555c8 Remove custom text selection color (#234) 2024-03-11 18:58:36 +01:00
Samy Pessé 7d53a2c849 Remove colors from HTML root and define them in the tailwind config (#233)
* Remove colors from HTML root and define them in the tailwind config

* Add visual test
2024-03-11 18:50:45 +01:00
Sebastian Graz 270f8b55a5 Hints (#232)
* V1 hint refactor

* checkbox fix

* Update src/components/DocumentView/Hint.tsx

remove comment

Co-authored-by: Samy Pessé <samypesse@gmail.com>

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-03-11 18:28:20 +01:00
Samy Pessé 56a9d5601b Fix cache revalidation in KV and output stats on revalidation (#231)
* Store setAt on cache meta and output stats on revalidation

* Delete from KV cache

* test more

* Improve

* Format

* Store the key in metadata

* Avoid storing too much in KV

* Don't put tag on resolve of url
2024-03-11 13:30:26 +01:00
Samy Pessé ea7ff33f3a Expose publicly cache tags with x-gitbook-cache-tag (#230) 2024-03-11 10:17:44 +01:00
Samy Pessé 642e33444a More immutable cache and pre-revalidation (#229)
* Try different approach

* Revalidate before cache expires

* TS

* Only replicate to local backends

* Ensure revalidate is done only once for the same key

* Improve perf of getCacheKey

* Simplify type

* Use better method and comment

* Use it 7 days only
2024-03-11 09:35:20 +01:00
Samy Pessé 0e858b1a43 Improve span name in sentry for cache (#228)
* Improve span name in sentry for cache

* Better use `trace`

* One more span

* Lint

* Log memory usage

* Reuse span between fetchValue and get
2024-03-09 14:31:23 +01:00
Samy Pessé 510a6f39d7 Fix revalidation and redis get (#226)
* Log

* Try to fix

* Use automaticDeserialization

* Log errors

* Ignore AbortError
2024-03-08 16:38:43 +01:00
Samy Pessé f9e3835c2f Simplify redis cache and remove hits count (#225)
* Simplify redis cache and remove hits count

* Fix naming

* Update src/lib/tracing.ts

Co-authored-by: Steven H <shne24@gmail.com>

---------

Co-authored-by: Steven H <shne24@gmail.com>
2024-03-08 13:05:32 +01:00
Greg Bergé 5a5b4bb93c Replace Puppeteer by Playwright (#224)
* Replace Puppeteer by Playwright

* Remove the limit of workers on ci

* Various fixes after review

* Document things
2024-03-08 10:41:30 +01:00
Samy Pessé 55d1e538d9 More resilient caching and use of KV (#222)
* Add unit tests for "race"

* Reduce to 80s

* Implement a Cloudflare KV cache

* Format

* Lint

* Fix tagging of entries in KV

* No longer use HTTP cache tags

* Simplify tags to only keep 2

* Implement a blockFallback logic

* Improve the block fallback logic

* More tests

* Start introducing a always optional signal on all cache ops

* Correctly pass signal end to end

* Fix one more case and add tests

* Fix it

* Add test for error

* Fix error handling

* Simplify even more

* Improve logs

* Improve logs / measurements

* Fix timing

* Fix read cache duration and add minor tests

* Log redis time

* Change replication logic

* Fix redis errors

* Log more

* More logs and test memory first

* Improve tracing for cache backends

* Ignore all dependencies

* Log the key in the cache low level traces
2024-03-08 09:43:30 +01:00
Greg Bergé 7d04336b5f Support synced blocks (#223) 2024-03-08 09:16:01 +01:00
Samy Pessé 79f420eb8e Add timeout to cache get (#221)
* Add timeout to cache get

* Reduce it to 200ms
2024-03-06 20:12:47 +01:00
Samy Pessé 2742d961ee Remove feedback toast (#217) 2024-03-06 18:27:25 +01:00
Samy Pessé f41b0c7ba1 Fix crash when resolving ref fails in an OpenAPI file (#220)
* Fix crash when resolving ref fails in an OpenAPI file

* Use static.gitbook.com for assets prefix
2024-03-06 18:09:34 +01:00
Samy Pessé 77527f0a4e Fallback for Intl.RelativeTimeFormat for old browsers (#219) 2024-03-06 17:08:09 +01:00
Steven H 9436549510 Fix an issue where ordered list items were not respecting the start property from the API. (#218) 2024-03-06 14:51:19 +00:00
Taran Vohra 76d6a2009e Fix visitor auth token lookup from request cookies (#215)
* Fix visitor auth token lookup from request cookies

* review
2024-03-06 15:34:25 +05:30
Samy Pessé 46c3ec6699 Add fallback to the different fonts (#216) 2024-03-06 10:59:43 +01:00
Samy Pessé 203e9103de Fix crash when displaying invalid Swagger 2.0 block (#214)
* Ignore errors when converting Swagger 2 to OpenAPI 3

* Apply page-api-block only when a block is actually displayed

* Format

* Try to be more lax
2024-03-06 10:43:11 +01:00
Samy Pessé d22944419f Prevent crash when integration associated to a block is no longer installed (#213)
* Prevent crash when integration is not installed for a block

* Format
2024-03-05 20:24:51 +01:00
Samy Pessé a9f9f18e66 Fix crash when resolving references without permissions (#212) 2024-03-05 19:45:38 +01:00
Samy Pessé fdaf722ba1 Align table cells to the middle (#211) 2024-03-05 18:17:32 +01:00
Samy Pessé 6c64841325 Use hardlinks instead of Next link for collection dropdown (#210) 2024-03-05 18:01:59 +01:00
Samy Pessé 44f4afdf94 Improve content reference resolution to support absolute ones to spaces (#209) 2024-03-05 17:39:24 +01:00
Samy Pessé a22bb55715 Do not crash on invalid LaTeX formulas (#208) 2024-03-05 16:16:29 +01:00
Samy Pessé 44945f887a Fix crash when no example can be generated for response of API (#207) 2024-03-05 15:51:40 +01:00
Samy Pessé cf20c5ff3b Output cache-control only when env is set (#206) 2024-03-05 15:46:08 +01:00
Samy Pessé c8935c62c8 Fix code block highlighting crashing when containing \r (#205) 2024-03-05 11:15:58 +01:00
Samy Pessé 1e1d202b5a Improve PDF export for tabs/expandables/api blocks (#204)
* Fix integrations blocks and text being too long

* Fix size of code blocks

* Open expandable by default on print mode

* Render tabs one after the other

* Adjust colors

* Open all in openapi when printing

* Fix title

* Format

* Fix TS
2024-02-29 19:49:03 +01:00
Samy Pessé d304c853fb Fix header logo (#203) 2024-02-29 14:46:56 +01:00
Samy Pessé 7278d7868d Translates and typing as safe-guard (#198)
* Translates and typing as safe-guard

* Add tests for intl
2024-02-29 12:09:53 +01:00
Samy Pessé cb91fb9df8 Fix access to cookies when used in iframe (#202)
* Fix access to cookies when used in iframe

* Allow https: embed
2024-02-29 11:24:55 +01:00
Samy Pessé 826ddbc533 Improve preview URL by better storing the api endpoint and the token in cookies (#201)
* Use one cookie per content and store api host in it

* Fix fallback to api endpoint

* Ignore parsing error
2024-02-29 10:46:41 +01:00
Samy Pessé 10375bae51 Add tracing to cache operations to debug I/O issue (#200)
* Change global context used to "cf"

* Add traces to cache operations
2024-02-29 10:19:57 +01:00
Samy Pessé f26e856170 Accept customization settings as a query paremeter (#199)
* Accept a query parameter "customization" to extend space customization

* Test it

* Use rison instead of JSON

* Use object version
2024-02-28 19:24:48 +01:00
Samy Pessé 2df5d68eae Pass next.internal on fetch requests to avoid I/O sharing (#197) 2024-02-28 15:26:36 +01:00
Samy Pessé 70c6c9df42 First pass at implementing ContentKit (#69)
* Start

* Try webframe

* Lint and format

* Move to package

* Continue

* Implement card and cleanup contexts

* Start code blocks

* Start rendering image

* Continue with card

* Start stack

* Start text

* Start modal

* Format

* Continue

* Fix TS errors

* Cleanup

* Make markdown work with server components

* Format

* Add visual test

* Lint and format

* Fix lifecycle

* Implement textinput

* Divider

* Remove console logs

* Remove listSpaceIntegrationsBlocks
2024-02-28 14:46:47 +01:00
Samy Pessé 8eb2850bdd Fallback crypto.randomUUID for old browsers (#196)
* Fallback crypto.randomUUID for old browsers

* Oups
2024-02-28 14:09:31 +01:00
Samy Pessé 887e99c8ed Archive build output on GitHub Actions 2024-02-28 10:52:41 +01:00
Samy Pessé 46b3e461dd Fix code block highlighting resulting in shared promises (#195)
* Fix code block highlighting resulting in shared promises

* Lint

* Fix tests
2024-02-28 10:44:47 +01:00
Samy Pessé 76ba5d043e Use customization.title instead of space.title (#194)
* Use customization.title instead of space.title

* Format

* Fix TS
2024-02-28 10:26:04 +01:00
Samy Pessé 5e12c0a9be Ignore errors when tracking page views (#193) 2024-02-27 16:27:09 +01:00
Samy Pessé 7ed89fe0fe Ignore errors with animate calls (#192) 2024-02-27 11:48:40 +01:00
Samy Pessé a3af78031f Use .ctx to avoid issue with proxy object (#191) 2024-02-27 11:15:58 +01:00
Samy Pessé 05de8109bb Fix crash for some code blocks with annotations (#190)
* Start

* Add failing test

* Better handle nested tokens

* Run tests in CI

* Comment

* Fix another case
2024-02-27 11:03:51 +01:00
Samy Pessé 41278bad68 Fix responsiveness of API blocks (#189)
* Add unit test

* Fix responsiveness of API blocks with 2 columns
2024-02-24 17:14:06 +01:00
Samy Pessé 884f5aabb0 Fix text overflowing on long words (#188)
* Break words when overflowing

* Format and add tests
2024-02-24 17:00:11 +01:00
Samy Pessé eea1323c17 Don't show aside when there is only one aside (#187) 2024-02-24 15:17:53 +01:00
Samy Pessé 341264e879 Fix page not found and main layout (#186)
* Switch to a global layout

* Format and improve main layout

* Fix TS

* Real fix

* Cleanup
2024-02-23 22:53:02 +01:00
Taran Vohra 345a2ea964 log request cookies in the middleware (#184) 2024-02-23 19:44:50 +05:30
Samy Pessé 56143277b7 Expose window.GitBook to integrations (#185)
* Expose window.GitBook to integrations

* Simplify

* Oups

* Use basic script to load integrations

* Preload the scripts
2024-02-23 13:32:09 +01:00
Samy Pessé aeeb9b0305 Hide table header when column titles are empty (#182)
* Hide table header when column titles are empty

* Add test

* Skip downloading puppeteer for some CI jobs
2024-02-22 13:23:56 +01:00
Taran Vohra 64bb5ebf5a Redirect after normalizing URL for VA (#183)
* Redirect after normalizing URL for VA

* Redirect after normalizing URL for VA
2024-02-22 17:31:41 +05:30
Taran Vohra 98d44f01c7 Do a redirect if visitor auth token found in param (#181)
* redirect if visitor auth token in param

* add resolved cookies to redirect
2024-02-22 16:41:43 +05:30
Samy Pessé 1fc9f17f76 Use correct colors for contrast header theme (#179) 2024-02-21 00:22:07 +01:00
Samy Pessé 9a25c8c19c Fix size of cards in table (#178) 2024-02-20 19:01:41 +01:00
Samy Pessé 09de40002a Fix share links resulting in errors because of (#177) 2024-02-20 14:29:14 +01:00
Samy Pessé a2d967e98e Use Joypixels instead of native emojis (#176)
* fist test

* Use a font

* Cleanup

* Use right fallbacks for fonts

* Lint

* Cleanup and comment

* Add visual test
2024-02-20 13:54:57 +01:00
Taran Vohra 258ef413b1 Fix logic to fetch visitor auth token from cookies and cleanup URL params (#175)
* Remove va token from query params before using it for response

* sanitize
2024-02-20 17:11:23 +05:30
Samy Pessé cf1f281119 Fix color of the title in the header when theme is custom (#174) 2024-02-20 09:14:04 +01:00
Samy Pessé 773fa50d41 Fix H# in aside and link to expandables (#173)
* Set ID on expandables

* Do not include h3

* Add a hash link

* Format

* Add tests
2024-02-19 20:00:18 +01:00
Samy Pessé b0725eb852 Fix CI deployment config 2024-02-19 16:36:06 +01:00
Samy Pessé 6bd6ddd031 Use an assetPrefix to serve all assets from same URLs (#172)
* Test an assetPrefix

* Fix condition

* Use the env instead

* Use it for CSP
2024-02-19 16:32:33 +01:00
Samy Pessé 9b285625d9 Hide page footer navigation when disabled in customization (#171) 2024-02-19 15:24:43 +01:00
Taran Vohra 8c0970d3d9 Ensure unique and isolated visitor auth cookie state (#169)
* Ensure unique and isolated visitor auth cookie state

* Fix typecheck

* Fix typecheck
2024-02-19 18:18:02 +05:30
Samy Pessé 1ad9bfd6f3 Fix image size in some cases (#170) 2024-02-18 21:28:11 +01:00
Samy Pessé 1a37b17a68 Implement color mark (#168)
* Define text and background colors

* Handle dark mode

* Add content tests
2024-02-18 00:21:50 +01:00
Samy Pessé c5455d4498 Display page emoji in content-ref blocks (#167) 2024-02-17 21:23:22 +01:00
Samy Pessé a82c548f42 Fix image size and alignment (#166)
* Fix image alignment

* Fix size of inline image

* Correctly size images
2024-02-16 18:58:59 +01:00
Sebastian Graz eead1dba66 add heading hash order conditional (#165)
* add heading hash order conditional

* v1 api color pass

* Delete .env

* Format

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-02-16 10:29:18 +01:00
Samy Pessé a7d4896484 Process all pages to fetch the list of spaces in a collection (#164) 2024-02-15 17:32:20 +01:00
Samy Pessé fa734fb217 Fix border radius for tabs and code-blocks when using straight corners (#163)
* Fix border radius for tabs and code-blocks when using straight corners

* Format
2024-02-15 15:37:18 +01:00
Samy Pessé 46a1b58d01 Fix responsiveness of footer (#162) 2024-02-15 12:54:29 +01:00
Sebastian Graz 12520ccede Style sprint 4 (#160)
* Commit

* make light base lighter, improve table legiblity

* improve hover leg on toc

* improve tabs leg

* improve tab design

* improve expandable leg

* slight global color tweak

* hide debugger
2024-02-15 11:50:04 +01:00
Samy Pessé ebdec4966b Use absolute URLs for logos (#161) 2024-02-15 10:06:05 +01:00
Samy Pessé 0b620640fa Fix hiding the table of content when disabled in page options (#159)
* Hide TOC when page is configured to hide it

* Improve layout in different cases
2024-02-14 17:19:07 +01:00
Samy Pessé 06fb56edc7 Fix emoji not displayed in cards with target (#157)
* Fix emoji not displayed in cards with target

* Only have hover effect on card when clickable

* Use 4 instead of 2
2024-02-14 15:42:20 +01:00
Samy Pessé 49a1561801 Update @cloudflare/next-on-pages to 1.9.0 (#156) 2024-02-14 12:35:39 +01:00
Samy Pessé b2acfab7c0 Enable zoom on drawings (#155) 2024-02-14 12:00:46 +01:00
Samy Pessé cf193f1738 Fix size of logo in header (#154)
* Fix sizing of logo in header

* Format

* Fix cases where size is not passed
2024-02-14 11:17:29 +01:00
Samy Pessé 6edd2648a4 Fiz zoom causing inline image to be displayed as block, also fix dark mode (#152)
* Fix inline image being displayed as blocks

* Make it work on dark mode

* Format
2024-02-13 22:12:28 +01:00
Samy Pessé ec1769fc32 Let users zoom images (inline and block) (#151) 2024-02-13 21:54:48 +01:00
Samy Pessé e9432c9486 Fix default size for inline images (#150)
* Fix default size for inline images

* Lint
2024-02-13 21:08:11 +01:00
Sebastian Graz c3d9e85823 Style sprint 3 (#136)
* first pass at nested ordered list symbols

* remove margin inside lists

* V1 of nested bullets & fix header hash pos

* clean up

* convert listItem render to switch

* Improve lists

* improve heading hash

* fix list todos to match heading size too

* no need for inline-grid

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-02-13 21:03:57 +01:00
Samy Pessé 3e2327c707 Change refiner feedback form URL 2024-02-13 19:01:41 +01:00
Samy Pessé f2e5ad97ab Show button to share feedback about GitBook Open when in preview mode (#149)
* Show button to share feedback

* Lint
2024-02-13 18:27:48 +01:00
Samy Pessé 45dd16b146 Improve caching: reduce browser caching, optimize perfs of worker cache (#148)
* Disable browser caching

* Improve cache read

* Fix

* Try using it for lookup

* Read before increment in redis

* Don't use multi

* Limit cache to 2min in cloudflare

* Cache in cloudflare but not in the browser
2024-02-13 16:09:38 +01:00
Samy Pessé 9e5f717fbe Fix Bearer schema in code sample (#147) 2024-02-13 11:01:33 +01:00
Samy Pessé be46c5db4b Fix error "Cannot perform I/O on behalf of a different request" (#146)
* Use reliable cloudflare context

* Format

* Comment
2024-02-13 10:06:58 +01:00
Samy Pessé 97dafa5580 Make match background a customization option (#134)
* Add classname

* Start applying it

* reset existing style changes in favor of global setup

* setup v1 plain mode

* fix name clash

* move light/dark bases as vars

* side image render fix

* customize individual light tiers for light mode

* Add comment about primary and base

* remove style prop from image

* w-unset not needed on image

---------

Co-authored-by: sebastiangraz <graz@live.se>
2024-02-12 21:03:49 +01:00
Samy Pessé f62656ed9f Persist token in multi-id mode in a cookie (#144)
* Persist token in multi-id mode in a cookie

* Format
2024-02-12 16:53:04 +01:00
Samy Pessé 46a3543a5e Use new version of cloudflare/next-on-pages and remove patch (#145)
* Use new version of cloudflare/next-on-pages and remove patch

* TS

* Fix ts again

* Remove patch-package

* Remove test

* Make it work locally
2024-02-12 16:38:33 +01:00
Samy Pessé 2470a40531 Only catch GitBookAPIError in getPublishedContentByUrl (#143) 2024-02-09 21:40:10 +01:00
Samy Pessé 34e339b5e4 Correctly handle errors from getPublishedContentByUrl (#142)
* Correctly handle errors from getPublishedContentByUrl

* Format

* Improve error message
2024-02-09 19:24:36 +01:00
Samy Pessé dfb8d4e8d4 Normalize the URL by redirecting (#141) 2024-02-09 12:59:33 +01:00
Samy Pessé 4826c9e012 Fix search button in compact mode (#140) 2024-02-09 11:56:57 +01:00
Samy Pessé 6441f8a05e Improve placeholder in search button and input (#139)
* Improve search placeholders

* Improve perfs of AI search

* Increase back font-size

* Format
2024-02-09 11:25:03 +01:00
Samy Pessé 6cab31faf6 Stream AI answers to questions (#138)
* Stream AI answers to questions

* Use a different polyfill

* Revert "Use a different polyfill"

This reverts commit b8474c56301faf3180eebf81f697703c31447500.

* Update api

* Patch event-source-polyfill to support Cloudflare

* Patch the min version

* Update api client and remove eventsource polyfill

* Cleanup
2024-02-08 15:53:05 +01:00
Samy Pessé 1c0ea074b3 Update API client and fetch API blocks in new format only (#137) 2024-02-07 18:19:30 +01:00
Sebastian Graz caa74cf48f Style sprint 2 (#135)
* fix tab multiline

* OpenAPI improvements (#127)

* Fix display of authentication infos

* Fix property names

* Fix body / request starting with oneOf

* CSS fixes

* Show description

* Format

* Fix code samples

* Convert swagger 2.0 to OpenAPI v3 (#128)

* Convert swagger 2.0 to OpenAPI 3

* Format

* Fix page with one api block shown as empty (#129)

* Fix page with one api block shown as empty

* Format

* Style sprint (#126)

* V1 code blocks fix

* equalize modal text label + fix safari bug with fixed position stroke

* code block adjustments

* fix search result spacing

* remove metal + adjust light and dark mode

* remove metal from tw config

* Add colordebugger + remove unused global colors

* correct opacities on all colors

* first part of cleaning up colors

* fix tab colors

* search modal color changes

* adjust global colors

* expandable + code color changes

* add delay to loading panes

* adjust globals

* improve select table type

* improve light mode checkbox

* fix delay

* content

* uncomment debug

* expandable fixes

* OpenAPI improvements (#127)

* Fix display of authentication infos

* Fix property names

* Fix body / request starting with oneOf

* CSS fixes

* Show description

* Format

* Fix code samples

* Fix empty API responses not being displayed (#130)

* Fix response not being displayed when contains no body

* Fix padding

* Resolve any JSON/YAML OpenAPI file and resolve common parameters (#132)

* Fix parsing of OpenAPI when content-type is unknown

* Resolve common parameters

* Format

* Add support for straight corners (#131)

* Add class to body and tailwind variant

* Use it on the search button

* Use it for buttons and cookies banner

* Use it for cards

* Use it in more places

* Lint

* More

* page feedback

* theme toggler

* Rename Authentication to Authorization (#133)

* remove unused color light-5

* fix dupe css

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-02-06 16:25:02 +01:00
Samy Pessé c829555f1b Rename Authentication to Authorization (#133) 2024-02-02 10:20:30 +01:00
Samy Pessé 53299ce829 Add support for straight corners (#131)
* Add class to body and tailwind variant

* Use it on the search button

* Use it for buttons and cookies banner

* Use it for cards

* Use it in more places

* Lint

* More

* page feedback

* theme toggler
2024-02-02 10:16:15 +01:00
Samy Pessé 260305759d Resolve any JSON/YAML OpenAPI file and resolve common parameters (#132)
* Fix parsing of OpenAPI when content-type is unknown

* Resolve common parameters

* Format
2024-02-01 22:29:28 +01:00
Samy Pessé b5e6673976 Fix empty API responses not being displayed (#130)
* Fix response not being displayed when contains no body

* Fix padding
2024-02-01 10:30:03 +01:00
Sebastian Graz e5fc5c2d2a Style sprint (#126)
* V1 code blocks fix

* equalize modal text label + fix safari bug with fixed position stroke

* code block adjustments

* fix search result spacing
2024-01-31 23:20:09 +01:00
Samy Pessé a8379be4c1 Fix page with one api block shown as empty (#129)
* Fix page with one api block shown as empty

* Format
2024-01-31 16:11:08 +01:00
Samy Pessé 75876474a2 Convert swagger 2.0 to OpenAPI v3 (#128)
* Convert swagger 2.0 to OpenAPI 3

* Format
2024-01-31 15:46:42 +01:00
Samy Pessé f8fde8cec8 OpenAPI improvements (#127)
* Fix display of authentication infos

* Fix property names

* Fix body / request starting with oneOf

* CSS fixes

* Show description

* Format

* Fix code samples
2024-01-31 14:36:20 +01:00
Samy Pessé 4bbd86aeca Render drawing blocks (#125)
* Improve rendering of block with captions

* Remove redirect test
2024-01-30 18:30:27 +01:00
Samy Pessé aeab122d54 Use flex and simplify code block styling to fix safari issues (#124) 2024-01-30 12:10:34 +01:00
Samy Pessé 85ec1884e6 OpenAPI blocks (#74)
* Start methods to resolve refs

* bun

* Start package

* Add code to resolve ref

* Continue

* Deref

* Start monorepo

* Continue

* Fix ref resolver

* Style a bit more

* Start toggling section

* Continue

* Start displaying query/path/headers params

* Hide respo se if empty

* Fix recursive refs

* Simplify interactive and styling

* Display enums

* Format

* Improve type name being displayed

* Improve naming

* Render oneOf/anyOf/allOf

* Handle circular references

* Start variable in server url

* Use client component for the spec part

* Improve CSS sizing

* Display open api blocks in aside

* Make aside an overlay

* Improve stickiness of openapi

* Align document on the left when api page

* Improve general layout

* Better align

* Fix padding in aside

* Use syntax highlighting

* Show sample of response

* Improve code generation

* Improve code generated

* Format

* Format

* Rename to OpenAPI

* Skip deprecated properties and handle additionalProperties

* Use discriminator for naming

* Better name enum

* Make entire header toggeable

* Format and lint

* Add curl example

* Improve curl

* style pass

* Start securities

* Bun

* Fix TS

* Improve label

* Start markdown

* Improve code samples

* Test

* Use custom skeleton for api block

* Format

* Add support for redocly code samples

* Fix api blocks in aside

* Use typography for markdown

* Format

* Fix spacing in markdown

* Render headers

* Format

* Format

---------

Co-authored-by: Sebastian Graz <graz@live.se>
2024-01-30 10:15:58 +01:00
Samy Pessé 86a436645a Increase font-weight of code mark in headings (#123) 2024-01-27 22:11:27 +01:00
Samy Pessé 0096947c72 Fix font-size and line-height of code text mark (#122) 2024-01-26 12:42:31 +01:00
Samy Pessé ee35796576 Lower traces sample rate on Sentry to 1% (#121) 2024-01-26 11:32:24 +01:00
Samy Pessé 7045675eda Fix soft-break in the document (#120) 2024-01-26 11:08:39 +01:00
Samy Pessé 730b444403 Improve cache invalidation (#119)
* Limit revalidation and limit memory cache to 5 min

* Format

* Return keys for memory cache invalidation
2024-01-25 15:44:28 +01:00
Sebastian Graz d4e3c6d597 v1 (#117) 2024-01-24 17:52:12 +01:00
Samy Pessé f1f91a6816 Fix opening search results (#118)
* Switch to nuqs

* Navigate post url update

* Fix

* Fix AI search
2024-01-24 17:25:01 +01:00
Samy Pessé b5986e833a Fix optimized image size when using inline image (#116) 2024-01-24 14:02:16 +01:00
Samy Pessé eabc46b86e Start using next-themes (#115)
* Start using next-themes

* Fix with nonce

* Lint
2024-01-24 11:39:59 +01:00
Samy Pessé aec74d68fd Stop using shared promises (#114)
* Try cf.cacheTags

* Remove shared promises

* Use a pendings set per context
2024-01-23 23:19:23 +01:00
Sebastian Graz 22a68a71c4 Style PR (#101)
* fix card clickthrough

* better checkbox empty states

* add card bg

* fix keynav styles search

* add v1 style for search scope

* scope mobile defensive css

* Update src/components/Search/SearchResults.tsx

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-01-23 21:40:03 +01:00
Samy Pessé 9d9040f24e Fix error for redirects/files on change-requests (#113) 2024-01-23 21:38:28 +01:00
Samy Pessé 613d67c14e Limit Cloudflare data cache to 5 minutes (#112) 2024-01-23 18:28:20 +01:00
Samy Pessé 5f7b29bbc8 Improve purging of cache and return keys (#111)
* Use input url instead of request url

* Improve cache purging

* Lint

* Fix TS

* Add method to delete from cloudflare

* Clear on all backends

* Fix

* Add global cloudflare tag
2024-01-23 18:21:46 +01:00
Samy Pessé 756b5a766f Setup Sentry for errors (#110)
* First try

* Lint and format

* Use edge runtime

* Use envs for sentry

* Fix type

* Fix upload of sourcemaps

* Try fixing monitoring calls

* Fix gitbook/monitoring in middleware

* test error in middleware

* Define context on sentry data

* Set SENTRY_ENVIRONMENT to preview or production

* Format

* Pass url and userAgent

* Remove test cases

* Disable debug

* Remove ignoreBuildErrors
2024-01-23 14:36:56 +01:00
Samy Pessé 29f2177357 Close table of content when clicking on a link (#109)
* Close table of content when clicking on a link

* Lint
2024-01-23 10:48:25 +01:00
Samy Pessé 0e4ba13065 Show page emoji if any (#108)
* Show page emoji if any

* Format
2024-01-20 23:41:28 +01:00
Samy Pessé 05f206a7a5 Use an input for the search input to scroll value when long (#106) 2024-01-20 21:46:58 +01:00
Samy Pessé e660432227 Add support for table text column alignment (#107)
* Align text in table based on set alignment

* Format
2024-01-20 21:46:35 +01:00
Samy Pessé 56b8b86f58 Correctly align logo to the left (#105) 2024-01-20 18:37:21 +01:00
Samy Pessé da215347f4 Add aria-busy to loading components (#95) 2024-01-20 18:34:52 +01:00
Samy Pessé ec075af455 Store the build version in the generator meta tag (#104)
* Store the build version in the generator meta tag

* Format

* Send header with version

* Add header on 404 as well
2024-01-20 12:43:59 +01:00
Samy Pessé 1f7530aaf8 Set a user-agent for the API (#103)
* Pass user-agent and allow configuring it with envs

* Format
2024-01-19 14:55:04 +01:00
Samy Pessé 8c44653292 Add back last modified date in the footer of the page (#102) 2024-01-18 23:13:49 +01:00
Samy Pessé a6f7a71af9 Fix right click to save images (#100) 2024-01-17 12:19:33 +01:00
Samy Pessé b16636c180 Only show table progress on browsers that supports it (#99) 2024-01-17 12:18:31 +01:00
Samy Pessé 64a9e27ca7 Resolve revision and change request URL correctly (#98)
* Add tests for getURLLookupAlternatives

* Match correctly revisions and changes URLs

* Use revision and changerequets ID passed from lookup

* Prevent indexing these urls

* Start

* Start rendering toolbar

* Update api client

* Format

* Format

* Mock resolve of snippet

* Add test for revision
2024-01-15 09:42:38 +01:00
Samy Pessé 3c44eb4f80 Fix resolving redirect by encoding path (#97) 2024-01-12 21:37:14 +01:00
Samy Pessé 6e5208d3ae Fix handling of special chars in the URL (#96)
* Fix handling of special chars in the URL

* Add log

* More logs

* Test encoding

* Cleanup
2024-01-12 21:18:23 +01:00
Samy Pessé 3c2dbb7b10 Fix crash on invalid selectors (#94) 2024-01-12 17:45:27 +01:00
Samy Pessé 59a8e74e39 Remove useless console.log (#93) 2024-01-12 16:55:09 +01:00
Samy Pessé 2a1e491fee Show loading indicator when loading first results in search (#92)
* Show loading indicator when loading first results in search

* Fornat

* Format
2024-01-12 15:40:46 +01:00
Samy Pessé 7d60c75dd8 Allow seo indexation of x-gitbook-search-indexation (#91) 2024-01-11 18:33:46 +01:00
Samy Pessé f4ac246a09 Redirect to original image when cloudflare resize is returning an error (#90) 2024-01-09 14:05:32 +01:00
Samy Pessé e7c184cc99 Search across all spaces in a collection (#89)
* Start buttons

* Run the search globally

* Improve look and feel

* Improve text

* Format

* Fix TS
2024-01-08 19:23:12 +01:00
Samy Pessé 28be5aaeca Fix resolution of URL for collection URLs (#88) 2024-01-07 23:19:05 +01:00
Samy Pessé 5f6ca7af56 Hide trademark when disable in customization settings (#87)
* Hide trademark when disabled in customization

* Fix padding in toc

* Run upload of artifacts when failed
2024-01-07 13:55:01 +01:00
Samy Pessé 46a726f3a8 Fix visual tests being unreliable (#86)
* Test

* Upload failed tests as artifacts

* Format
2024-01-06 19:11:30 +01:00
Samy Pessé a1fca33947 Switch to <a> instead of next Link for aside (#85) 2024-01-05 17:51:10 +01:00
Sebastian Graz ccfcaa590b Style PR (#84)
* fixes for table values

* color tweaks rating

* inc legibility on aside active

* add tab separators

* fix hint icon

* fix header colors & remove custom balance

* Better mobile burger colors

* remove border from logofallback img

* style divider dark mode

* compact header + file + expandable hover + mt mobile nav

* testing file types
2024-01-04 18:43:37 +01:00
Samy Pessé 87e67866a4 Fix condition to render document being reversed (#83)
* Fix condition to render document

* Format
2024-01-02 18:31:15 +01:00
Samy Pessé 0c80f96579 Show grid of sub-pages when page is empty (#82)
* Add a blankslate when the page has no document

* Format
2024-01-02 17:55:43 +01:00
Samy Pessé 22eeaca92c Add support for all column types (#81)
* Support files and content ref

* Display all column types

* Pass width

* Format
2024-01-02 10:43:52 +01:00
Sebastian Graz 66ba1c244f Styling PR (#80)
* add BR to TOC links

* fix sticky TOC padding

* increase searchbar contrast

* align toc and aside

* copy on hover only

* nicer tabs

* more dynamic table sizes

* dynamic expandable treatment

* skeleton v1

* modal spacing + close modal on source click

* fix page link icon TOC

* add PDF separate spacing

* fix TW Intellisense + further styling of loadingpane

* properly style skeletons

* better loading panels, AI search enhancement while waiting

* Commit

* Use the same state for answer

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2024-01-02 09:09:01 +01:00
Samy Pessé 0668d8a287 Track page view (#42)
* Track page view using a server action

* Track the page view

* Format

* Track it once

* Support no page an pass language

* Update API client
2023-12-29 15:28:49 +01:00
Samy Pessé 2fdf3e3838 Progressive loading (#79)
* Suspense boundary and progressive loading on blocks

* Start refactoring to better leverage app router

* Use skeleton for page layout

* Improve dynamic toc

* Switch page full width to be client side only

* Format

* Remove old PageLoading

* Fix first page not marked as active

* Close search when clicking search link
2023-12-28 14:38:15 +01:00
Samy Pessé 1c2d68c518 Fix handle of multi-id and improve PDF UI in that case (#78)
* Fix handling urls with direct space ID

* Preserve all search params when navigating in the PDF UI

* Show a trademark on the pdf page

* Generate proper trademark url

* Format

* Cleanup
2023-12-27 16:32:59 +01:00
Samy Pessé c8358feeeb Support an "api" query parameter in mode multi-id (#77) 2023-12-27 14:15:47 +01:00
Samy Pessé 6cf73e4962 Support URL path to directly access a space by its ID (even private) (#76)
* Handle URLs /~space/:id

* Validate permissions in multi-id mode
2023-12-27 13:46:35 +01:00
Samy Pessé 67b20138dd Show loading, fix z-index and prevent print from opening (#75) 2023-12-27 11:37:44 +01:00
Samy Pessé 83f4cb5968 Add link to PDF export in the page and improve PDF UI (#73)
* Add buttons to pdf page

* Present as page

* Fix break

* Show active page

* Add description

* Make buttons work

* Handle back link

* Show alert when reaching maximum

* Format
2023-12-26 23:14:46 +01:00
Samy Pessé 24f5e73bbe PDF export (#72)
* Start

* Improve generation

* Improve style

* Lint

* Use tilde instead of dot in the url

* Improve style

* Fix page group

* Format

* Add visual tests for PDF
2023-12-26 18:36:44 +01:00
Sebastian Graz 1fde857aee Stylepr (#60)
* hint leading

* first attempt at themed ui

* v2 theme ui

* fix feedback

* fix hint css override

* cookie

* more sensible scroll logic

* Add better heading margin

* inline code styling

* fix copy button, list vis, next/prev mobile

* add shortcut to search button

* search button, toc

* add toc style

* fix toc hover

* safari fix

* simplify search, swagger, next/prev

* add mask to page cover

* codeblock fix

* global defaults

* improve mobile cards

* modal changes

* change mask intensity dark mode, fix table progress zindex

* a target

* selection, footer, search icon

* fix card resp

* fix multi col images

* fix aside

* card item pos

* search vis

* reuse same header for mobile

* fix header and search legibility

* format

* Sidebar changes

* remove linear gradient light mode page cover
2023-12-26 14:38:54 +01:00
Samy Pessé 4d38479a0f Render inline images (#71)
* Implement inline images

* Format
2023-12-26 12:22:19 +01:00
Samy Pessé db4d4a3408 Format (#70) 2023-12-26 11:20:08 +01:00
Samy Pessé 7267398d5b Use caching for search/ask and rich content for answers (#68)
* Use caching for search/ask

* Refactor DocumentView to be ready to be used for other stuff

* Start logic to use document

* Fix comment

* Remove log

* Format and typecheck
2023-12-25 22:59:14 +01:00
Samy Pessé 2d4c9880fd Fix last accessibility issue in cookies modal and try CI to monitor regressions (#67)
* Add aria-label to cookies modal

* Test lighthouse

* Remove lighthouse as it doesn't work in bun

https://github.com/oven-sh/bun/issues/4958

* Translate everything in search
2023-12-24 17:44:36 +01:00
Samy Pessé 231654e43b Improve accessibility of the cookie banner (#66) 2023-12-24 16:30:34 +01:00
Samy Pessé bfdf6640c8 Add "Edit on GitHub" in aside (#58)
* Start showing link in the aside

* Show link in aside

* Add icon next to link

* Fix padding
2023-12-24 16:04:25 +01:00
Samy Pessé 528a06c65a Improve scroll and aside (#64)
* Scroll to the right location and show active section in aside

* Format
2023-12-24 16:02:34 +01:00
Samy Pessé f7cb622863 Render inline emojis as native emojis (#65) 2023-12-24 14:53:22 +01:00
Samy Pessé 6f6dde1aa4 Update tailwind to 3.4 (#63)
* Update tailwind to 3.4.0

* Update tailwind-merge

* Fix responsive for cards in the footer

* Make card responsive

* Lint
2023-12-24 01:26:51 +01:00
Samy Pessé 3188795a52 Improve not found error (#62)
* Implement error page

* Improve color

* Lint

* Add padding for mobile
2023-12-23 23:25:01 +01:00
Samy Pessé e681aa6ba1 Use card for embed and display caption (#61)
* Use card for embed and display caption

* Fix warnings in icon
2023-12-23 22:49:28 +01:00
Samy Pessé 215c724a9b Use Cloudflare Cache API as one of the cache backend (#59)
* Implement cache for cloudflare

* Start using it

* Fix cache use

* Generate proper URLs

* Comment

* Fix cache always resulting in cache miss

* Log

* Correctly cancel redis

* Write to fallback caches

* Disable memory cache

* Re-enable memory cache

* Try patching

* Use it

* Also patch package.json

* Fix TS errors

* Remove yarn.lock

* Fix local error

* Lint

* Try bunx to fix vercel build

* Update lockfile

* Add back revalidating
2023-12-22 11:05:14 +01:00
Sebastian Graz c1d3f990f1 Styling PR (#56)
* v1 loading state

* refactor primitives

* fix order

* fix toast styling

* v1 rating

* transition on page spinner

* visual fixes
2023-12-21 16:51:36 +01:00
Samy Pessé 6a62f42521 Lazy load KaTeX CSS (#57)
* First attempt at lazy loading it

* New approach

* Format

* Remove logs
2023-12-21 15:11:06 +01:00
Samy Pessé e81d65dc2e Fix typescript error 2023-12-21 12:38:09 +01:00
Sebastian Graz c5f75116d3 Commit (#45) 2023-12-21 12:27:12 +01:00
Samy Pessé c18ec51a4a Experiment with setting Cloudflare-CDN-Cache-Control to force caching 2023-12-21 10:24:11 +01:00
Samy Pessé 5f690af5fb Fix flash of the header when switching between light and dark mode (fix RND-1917) 2023-12-20 18:22:07 +01:00
Samy Pessé fbc2ae10a0 Show cookies approval toast (#55)
* Show cookies toast when privacy policy is enabled

* Flex buttons

* Improve design

* Fix mobile design
2023-12-20 16:51:14 +01:00
Samy Pessé ca3ab044c3 Improve CI with caching and lint work (#53)
* Cache next.js build

* Add format and lint job

* Run typecheck

* FIx all TS issues

* Declare modules for images
2023-12-20 16:07:18 +01:00
Samy Pessé 2888b95b36 Accept a GITBOOK_TOKEN to fetch published content (#54) 2023-12-20 16:04:44 +01:00
Samy Pessé b11566dfb1 Fix favicon for collections and improve middleware matching (#52)
* Use collection title instead of space/customization title when possible

* Skip useless match
2023-12-20 11:41:04 +01:00
Samy Pessé be198045b1 Fallback to using hash of arguments for cache key (#51)
* Fallback to using hash of arguments for cache key

* Dummy commit to trigger build
2023-12-20 09:36:20 +01:00
Samy Pessé 720c2ca909 Setup visual testing (#50)
* Add cloudflare job to publish pages

* Try like this

* Fix build path

* Try end to end

* Fix installation

* Use var instead of secret for CLOUDFLARE_PROJECT_NAME

* Use new puppeteer mode

* Add more tests

* Run in parallel

* Go back to no-concurrency

* Test pagespeed

* Print output

* Fix thresholds
2023-12-19 23:51:06 +01:00
Samy Pessé c935700672 Improve cache revalidation to avoid processing keys multiple times 2023-12-19 19:39:04 +01:00
Samy Pessé e04d03c696 Remove cache tags for documents 2023-12-19 19:31:14 +01:00
Samy Pessé 4f84011f6b Purge cache when option is passed and revalidate starting by entries with max hits (#49)
* Accept an option to purge without refreshing

* Store hits on the redis cache entry

* Revalidate first the entries with the most hits

* Format

* bun

* Ignore error from JSON.NUMINCRBY
2023-12-19 19:16:36 +01:00
Samy Pessé 93aa1cfabf Fix typecheck in .gitbook folders 2023-12-19 18:13:11 +01:00
Samy Pessé 522eaa4319 Fallback to API to resolve page by path to handle redirects (#48) 2023-12-19 15:55:00 +01:00
Samy Pessé 772d120e3a Show loading spinner when navigating between pages (#46) 2023-12-19 15:24:54 +01:00
Samy Pessé bfe91f71f9 Generate robots.txt and add meta link to privacy policy (#47) 2023-12-19 13:34:55 +01:00
Samy Pessé e903bb7752 Update upstash module to fix typing 2023-12-19 10:11:58 +01:00
Sebastian Graz 196e8bcfc0 quickfix: add overflow hidden if search modal open 2023-12-18 23:11:54 +01:00
Samy Pessé eb8baffcf8 Add class search-open to body when search modal is displayed 2023-12-18 22:03:07 +01:00
Sebastian Graz f3ecb69404 modal Y position 2023-12-18 21:53:35 +01:00
Sebastian Graz 86fe37f968 Search PR (#44)
* add search spinner

* better dark/light settings

* text color use textarea for input to get multiline

* fix fonts

* fix margins on result

* fix local ascent override, primary spinner color

* fix overflow

* fix overflow not scrolling all the way up

* testing hiding sidescroller on hover

* add better hover

* no-answer fix
2023-12-18 21:32:54 +01:00
Samy Pessé 953c6bd194 Revalidate cache instead of just invalidating it (#43)
* Store arguments and tags in redis cache

* Refactor cache to support revalidation

* Format

* Fix redis cache

* Try with both GT and NX

* Fix get from redis

* Fix json syntax

* New attempt

* Fix log

* Skip case where there is no key for tags

* New try

* Ignore when no tags is passed
2023-12-18 21:03:07 +01:00
Samy Pessé fc68dbdd4e Fix accessibility issues reported by PageSpeed tests (#41)
* Set aria-label on all buttons

* Use a <p> instead of <h4> in footer
2023-12-18 12:31:56 +01:00
Samy Pessé 705ea6c997 If image resizing fail, redirect to origin image 2023-12-18 12:07:49 +01:00
Samy Pessé 13b9f6b07f Optimize images using Cloudflare Images (#40)
* Optimize images using Cloudflare Images

* Try skipping middleware

* Make it work with base path

* Fetch image size

* Use a target instead of the cf fetch options

* Fix resizing

* Start optimizing images

* Preload images

* Use it for page cover

* Format and adapt cover

* Fix image resizing serving jpeg

* Lazy load dark mode images

* Timeout at 2s

* Fix iframe CSP

* Implement logic to lazy load images that should be offscreen

* Also lazy load cover images

* Low priority in preloading

* Fix csp
2023-12-17 22:26:07 +01:00
Samy Pessé afcb0ecba6 Load integration scripts and secure the app with CSP (#39)
* Set colorSchema metadata

* Try CSP

* Move colorScheme to generateViewport

* Bun install

* Use wildcard for img-src and connect-src

* Allow all unsafe-inline for now for style

* Remove nonce for style

* Remove nonce for style

* Optimize data fetching with parallel requests

* Try to reuse memory cache between middleware and rendering in CF

* Comment

* Fetch document in parallel of collections

* Cleanup

* Log if redis is enabled for caching

* Fix memory cache before redis one

* Optimize alternatives being tested
2023-12-17 00:25:07 +01:00
Samy Pessé 046e74b4a8 Page ratings form (#38)
* Start showing ratings in the aside

* Conditionally render it

* Format

* Lint

* Accept NEXT_PUBLIC_GITBOOK_APP_URL
2023-12-15 22:43:44 +01:00
Samy Pessé 4dfb7c1e61 Load all fonts (#37)
* Load all fonts

* Use font-content as CSS variable

* Fix weird performance.now issue

* Fix font definition
2023-12-15 12:16:52 +01:00
Samy Pessé 594a1d18a7 Log cache performances (#36)
* Log cache performances

* Handle concurrent requests

* Debug log

* Remove debug log

* Comment
2023-12-14 18:33:09 +01:00
Samy Pessé 909a6e76f5 AI Search: recommended questions and hide if disabled (#35)
* Don't show AI search if ask is disabled in the space

* Fetch recommended questions

* Comment and format

* Fix when withAsk is false

* Format

* Lint
2023-12-14 17:38:02 +01:00
Sebastian Graz 5103686d7f remove content-ref for now 2023-12-14 16:51:46 +01:00
Sebastian Graz dae7f704fa Style PR (#34)
* codeblock styling

* fix hover rounding

* checkpoint layout

* improve highlight algo

* v1 syntax theme

* fix table cell add title style

* color tweaks

* opaque sticky numbers

* fix collection spaces

* card aspect fix

* adding back full-width tables

* num tabs

* Add v1 more table types

* format
2023-12-14 16:17:13 +01:00
Samy Pessé 87c38f9091 Sources and followup questions in AI search (#33)
* Show followup questions

* Show sources

* Lint
2023-12-13 08:55:14 +01:00
Samy Pessé ece7f421b4 First basic integration of AI search (#32)
* Refctor Intl and show "Ask" in search

* Handle ask state in the url

* Start fetching answer
2023-12-13 00:57:42 +01:00
Samy Pessé 7a87cc1bb1 Implement an endpoint to clear cache for a space (#31)
* Implement a tagging logic for cache value

* Extract cache-tags from HTTP requests

* Auto-tag API cache entry

* Implement route

* Output cache-control and cache-tag

* Make the revalidate route a edge one
2023-12-12 23:34:18 +01:00
Samy Pessé 2001e4dba5 Use absolute URLs for metadata (icon / social graph) (#30)
* Use absolute URLs for metadata (icon / social graph)

* Disable cache using "next" instead of "cache"

* Use cloudflare module from upstash
2023-12-12 21:38:22 +01:00
Samy Pessé f13e6cb55b Fix use of abort controller and parallel lookup of url 2023-12-12 20:58:37 +01:00
Samy Pessé fff0ea8c34 Add logs 2023-12-12 19:28:34 +01:00
Samy Pessé ee0b3c2032 Wait for cache operation before responding in middleware 2023-12-12 19:24:22 +01:00
Samy Pessé a4ae7140f2 Remove GitHub actions staging workflow 2023-12-12 19:23:23 +01:00
Samy Pessé 7cdf04d2da Remove debug log and try with a single alternative url 2023-12-12 19:03:13 +01:00
Samy Pessé 9138b18a68 Add debug logs 2023-12-12 12:17:31 +01:00
Samy Pessé 632ac7bbab Test by passing a x-forwarded-host header 2023-12-12 11:03:08 +01:00
Samy Pessé ff8a343a54 Fix new cache on Cloudflare (#29)
* Try with next.revalidate = 0

* Remove log

* Format
2023-12-12 10:56:07 +01:00
Samy Pessé b7a4721d66 Fix expired token with fetch data cache (#28)
* Start using cache module for getPublishedContentByUrl

* USe cache-header in cacheResponse

* Pass no-store to getPublishedContentByUrl

* bun install
2023-12-12 10:10:54 +01:00
Sebastian Graz 9e0aabc8bd Styling PR 4 (#24)
* add space to expandable, reduce shadow

* temp animation

* little better anims

* v1 stagger

* add opacity-0 back

* fix opacity on header

* overlay fix opacity

* fix chevron shrink

* style summary arrow

* search button add transition

* style hint custom anchor colors

* Commit

* image border

* fix text color hints

* fix code & code within hints

* annotation pass

* clean up

* setup before iconwork

* simplify hint animations

* allow heading sizes in hints, fix global outline

* fix arrows pagefooter

* increase hitarea arrow

* style ol ul

* v1 checkbox

* toc motion speed

* link legibility, move header links to end, anchor underline

* table pass for busy content

* better table defaults

* v1 table side scroller

* only show on threshold

* format
2023-12-11 20:21:18 +01:00
Samy Pessé 860bc02aa8 Fix code highlighting in Cloudflare (#27)
* Try calling WebAssembly.instantiate directly

* Load from shikiji/onig.wasm instead
2023-12-11 13:43:30 +01:00
Samy Pessé e880bce80b Fallback to plain code block if syntax is not found (#26)
* Fallback to plain code block if syntax is not found

* Try with shikiji instead

* Fix css variables

* Try calling loadWasm

* Support highlighting for all languages of shikiji

* Remove shiki

* Install vscode-oniguruma

* Run bun
2023-12-11 13:23:21 +01:00
Samy Pessé eea8aa306e Prevent search indexation for now 2023-12-10 23:44:20 +01:00
Samy Pessé cf925fd21c Update next to 14.0.4 2023-12-10 23:07:41 +01:00
Samy Pessé 0d15b052ab Fix metadata for pages: title and og images 2023-12-10 22:19:36 +01:00
Sebastian Graz 5761b1914a Styling PR 3 (#23)
- Fix headings always showing hashtag
- replace slate-color with Gitbook brand everywhere
- add gitbook logo to TOC
- Style inline code blocks like `these`
- made TOC headings sticky to top on scroll
- Redesign the blockref component
- Nicer use of `ring` instead of `border` for layout separation
2023-12-05 20:44:56 +01:00
Sebastian Graz d38752433f Styling pr 2 (#20)
- hints remove blend mode on depth > 1
- hints icons animated
- Fix color theming on dropdown menu sub items
- figure out custom shadows for 1px stroke outside paragdim
- tab blocks add spacing between items
- set default accent/primary color if not set
2023-12-04 20:43:47 +01:00
Samy Pessé 8e5b28d2e0 Page cover (#22)
* Start rendering for the cover

* Style image

* Negative margins

* Support hero cover
2023-12-04 16:51:37 +01:00
Samy Pessé ba0d38c220 Page layout options (#21)
* Hide title/description based on layout

* Hide aside based on page.layout.outline

* Hide pagination based on layout

* Hide table of contents based on layout
2023-12-04 00:29:20 +01:00
Samy Pessé 5d236c138a Update gitbook/api@0.18.0 2023-12-03 19:17:25 +01:00
Sebastian Graz bc6244bb58 Styling PR 1 (#16)
* add maxwidth limit for very large screens

* testing animation on hints

* page aside style on darkmode

* fix icon TOC

* Make scrollbars stable when overflowing

* fix scrollbar on search

* search compact header

* search style

* test without bg toc

* Commit

* setup before mobile TOC

* test if style{} clashes

* fix TOC hover

* add prevent default on search shortcut

* add deps

* Add header mobile menu setup

* work on fallback logo

* style search modal position

* style hamburger button

* padding

* add rudimental toggle

* comment

* gap value responsive

* remove slate

* fix z index

* undo test

* Install and format

---------

Co-authored-by: Samy Pessé <samypesse@gmail.com>
2023-11-29 21:18:47 +01:00
Samy Pessé 0cdb5fdf61 Resole root page to / instead of its entire path (#19) 2023-11-29 19:20:31 +01:00
Samy Pessé 78f2469a53 Try the edge runtime (#18)
* Use edge runtime

* Install
2023-11-29 13:38:31 +01:00
Samy Pessé c0f7ccfe3f Dummy commit to trigger Vercel 2023-11-28 21:19:37 +01:00
Samy Pessé 28915e906f Fix invalid colors generated when deployed (#17)
* Try logging

* Try

* Try

* Fix?

* Format

* Remove log
2023-11-28 18:04:26 +01:00
Samy Pessé 92451dba91 Improve middleware with support for x-gitbook-basepath (#15)
* Accept a x-gitbook-api to use as the API endpoint

* Format

* Add support for x-gitbook-basepath

* Add skipTrailingSlashRedirect
2023-11-28 12:43:54 +01:00
Samy Pessé 02715436e7 Accept an X-GitBook-Api header to configure the API endpoint (#14)
* Accept a x-gitbook-api to use as the API endpoint

* Format
2023-11-27 19:00:31 +01:00
Samy Pessé b8af0cb4af Second try with staging git workflow 2023-11-27 16:06:29 +01:00
Samy Pessé b2b2a8c23c Automatically update the staging branch from main using a GH action 2023-11-27 16:03:30 +01:00
Samy Pessé 808f10d428 Namespace cache and prepare handling staging requests (#13)
* Implement UPSTASH_REDIS_NAMESPACE

* Accept X-GitBook-Host and switch to multi mode when present

* Format
2023-11-27 15:50:41 +01:00
Samy Pessé ee0d45fa8b Try fixing PageAside 2023-11-27 14:49:59 +01:00
Samy Pessé 315954dffc Use the new document API to fetch page document (#12)
* Use new API

* Remove getPageDocument

* Format
2023-11-27 13:57:10 +01:00
Samy Pessé bb8b039c1a Code blocks (#10)
* Remove added line

* Improve gutter and prepare wrap

* Style layout of code blocks

* Start rendering annotation

* Test serverComponentsExternalPackages

* Directly import theme

* Use Tailwind with shiki

* Prepare idea on how to lazy load languages

* Start better matching with inlines

* Make test work

* Start loading more languages

* Start annotations

* Format

* Fix multiple lines

* bun install
2023-11-26 23:49:04 +01:00
Samy Pessé fbd17713fe Use newer APIs to optimize data loading and fix resolution of links in the TOC (#11)
* Update api@0.16.0

* Fetch pages and files independantly

* Correctly resolve content ref in TOC

* Format

* Format

* Cleanup
2023-11-26 23:46:51 +01:00
Samy Pessé 2a03461a21 Improve readme 2023-11-23 11:31:04 +01:00
Samy Pessé 84fd934fe1 Try custom cache (#9)
* Try custom cache

* Fix redis cache

* Comment
2023-11-21 21:19:08 +01:00
Sebastian Graz aab7d0bd7a Design pass (#8)
* first stab at bullet points
* setup theming, custom opacities, use of brand UI colors
* color key change
* delete brand
* setup initial defaults
* Add opacity parameter to primary color
* style TOC
* styling pass header, footer, hints, toc, trademark
* table pass
* style pass, typo, quote, tabs, search, theme, toc
2023-11-21 18:29:36 +01:00
Samy Pessé a4ec3c8c53 Refactor routing logic for production to support multi-tenancy (#7)
* Move back to use the middleware as the main logic

* Fix link

* Improve lookup to support docs.gitbook.com.localhost:3000

* Make it work with dev url in prod for now

* Start lookup with API

* Continue

* Prepare for cloudflare build

* Dummy commit

* Try to abort requests

* Support x-forwarded-host

* Test multiple modes

* Add logs

* Add logs

* Update next

* Default to multi-path

* Switch back to nodejs runtime

* Adapt to staging API

* Make sure to return an absolute url for a redirect

* Update api client and try single request

* Try again with concurrent lookup
2023-11-21 16:53:02 +01:00
Samy Pessé 88795e35d9 Update @gitbook/api 0.14.0 (#6)
* Simplify types

* More fixes
2023-11-15 13:46:30 +01:00
Samy Pessé 2fe11a35d4 Functional foundation for search modal (#5)
* Start fetching search using a server actions

* Format

* Keyboard navigation in search

* Highlight query in results

* Add translation to input placeholder

* Add placeholder when no results
2023-11-14 21:36:53 +01:00
Samy Pessé 257f7cd62a Add demo (#4) 2023-11-14 18:11:32 +01:00
Samy Pessé 462b2b6e65 Add support for no header in customization settings (#3)
* Start hiding header

* Adapt page aside as well

* Revert condition
2023-11-13 22:08:29 +01:00
Samy Pessé 77f769c9c2 Fix some TS issues and group import during lint (#2)
* Start fixing TS errors

* Continue

* Also add dom.iterable

* Group header and lint
2023-11-12 21:17:18 +01:00
Samy Pessé df2e267fb2 Start search UI (#1)
* Start

* Improve style

* Add shortcut to open search modal
2023-11-12 00:46:30 +01:00
Samy Pessé 55b29ca608 Fix sitemap 2023-11-10 12:59:46 +01:00
Samy Pessé 61718847b0 Update typing for customization and use latest version of next.js 2023-11-09 19:10:20 +01:00
Samy Pessé 1d44267958 Fix icons 2023-11-04 23:40:17 +01:00
Samy Pessé f190139d5d Test fr 2023-11-04 23:37:55 +01:00
Samy Pessé cf54430651 Format 2023-11-04 23:35:45 +01:00
Samy Pessé d786e1332f Test emoji 2023-11-04 23:35:39 +01:00
Samy Pessé 9ed5dc490e Improve rendering of footer links 2023-11-04 23:30:17 +01:00
Samy Pessé 926fa0f52c Improve rendering of images 2023-11-04 23:24:18 +01:00
Samy Pessé 0eab4389a4 Make footer conditional 2023-11-04 19:02:01 +01:00
Samy Pessé a7c323a023 Start footer 2023-11-04 18:51:53 +01:00
Samy Pessé e5d94dbd23 Add support for emoji in icon 2023-11-04 18:32:05 +01:00
Samy Pessé 288e5db8dc Start favicon generation 2023-11-04 18:26:48 +01:00
Samy Pessé f84a5a2214 Improve accessibility of dropdowns 2023-11-04 16:06:59 +01:00
Samy Pessé 208dca6bab Start supporting collections 2023-11-04 15:18:30 +01:00
Samy Pessé f45735798a Start header links 2023-11-04 00:18:58 -04:00
Samy Pessé abb3ed132a Start theming header 2023-11-03 22:58:04 -04:00
Samy Pessé 13df0d69f4 Generate entire palette of shades for primary color 2023-11-03 22:29:20 -04:00
Samy Pessé cdddebb931 Start using dynamic color for primary 2023-11-03 22:14:29 -04:00
Samy Pessé 47cc664b4f Fetch customization settings 2023-11-03 21:36:40 -04:00
Samy Pessé df84dda36a Implement block content ref 2023-11-03 21:23:41 -04:00
Samy Pessé 84dd482430 Better type inline 2023-11-03 21:13:04 -04:00
Samy Pessé 1e389fca86 Use cache and fix crash in TOC 2023-11-03 21:03:38 -04:00
Samy Pessé 2d4faaf396 Add link to generate links in PDF mode 2023-11-03 16:59:37 -04:00
Samy Pessé 85af5fd4e2 Start PDF html generation 2023-11-03 16:16:00 -04:00
Samy Pessé 8a08f5ae94 Start generating sitemap.xml 2023-11-03 15:45:42 -04:00
Samy Pessé af646b05af Update @gitbook/api 2023-11-01 14:04:23 -04:00
Samy Pessé 07ad0d3909 Try more blocks 2023-11-01 13:41:14 -04:00
Samy Pessé 12da9e27bb Implement block file 2023-10-31 19:22:37 -04:00
Samy Pessé 2b56afb848 Fix some blocks 2023-10-31 18:46:47 -04:00
Samy Pessé 117721f5f6 Fix crash 2023-10-30 20:11:48 -04:00
Samy Pessé 9ab6bf0cec Render inline and block math 2023-10-30 19:50:09 -04:00
Samy Pessé 2e28affa93 Fix type 2023-10-30 19:03:15 -04:00
Samy Pessé 55464029d4 Add support for quote 2023-10-30 18:59:17 -04:00
Samy Pessé d9b8ae95bd Add icons and color to hint 2023-10-30 18:48:17 -04:00
Samy Pessé 80e4d7186c Better type and implement start of cards 2023-10-30 15:45:31 -04:00
Samy Pessé 62ddeaa6bf Start swagger 2023-10-30 13:05:57 -04:00
Samy Pessé 2d278e612c Disable typechecking in next build 2023-10-29 23:32:55 -04:00
Samy Pessé 4b46eac5ba Improve flex in header 2023-10-29 16:50:22 -04:00
Samy Pessé 73fcc0f9ae Use it for the page footer as well 2023-10-29 16:33:27 -04:00
Samy Pessé b5b7090bb9 Start translations 2023-10-29 16:29:59 -04:00
Samy Pessé af09b108d1 Add button for headings 2023-10-29 15:16:35 -04:00
Samy Pessé 66157393ea Start table 2023-10-29 13:49:31 -04:00
Samy Pessé e62f91dc0d Start dark mode 2023-10-29 10:11:33 -04:00
Samy Pessé cca37bc9e8 Start rendering images 2023-10-29 09:05:48 -04:00
Samy Pessé 873570543f Start expandable 2023-10-24 22:14:20 +02:00
Samy Pessé dd0e6db171 Start tabs 2023-10-24 22:07:19 +02:00
Samy Pessé 7295d25e4e Start aside with sections 2023-10-24 21:42:45 +02:00
Samy Pessé e1372b0ede Make layout great! 2023-10-24 20:57:00 +02:00
Samy Pessé 4ab6e6272e Improve layout and prepare for full width blocks 2023-10-24 20:07:27 +02:00
Samy Pessé cdf17b2d80 Improve search button and add line on toc 2023-10-24 19:32:18 +02:00
Samy Pessé e675454117 Add icons and improve toggeable buttons in the toc 2023-10-24 19:12:32 +02:00
Samy Pessé cde014a355 Start prev/next navigation 2023-10-24 18:48:37 +02:00
Samy Pessé cfb197067a Start search box 2023-10-24 18:22:40 +02:00
Samy Pessé 6786f64c9f Fix page link resolution 2023-10-24 17:45:13 +02:00
Samy Pessé 3443ed3e82 Start link and switch to tailwind-merge 2023-10-24 17:42:54 +02:00
Samy Pessé cef72dca61 Start marks and fix h3 2023-10-24 14:00:57 +02:00
Samy Pessé 3cb826de96 Start highlighting of code blocks 2023-10-24 13:36:32 +02:00
Samy Pessé 5f01b90f55 Open ancestors of current page in TOC 2023-10-24 08:25:06 +02:00
Samy Pessé b41ab9115d Start toggling toc 2023-10-24 08:12:43 +02:00
Samy Pessé 970731b38a Improve cover image 2023-10-24 07:52:29 +02:00
Samy Pessé 02bbb39765 Simplify and generate og:image for each page 2023-10-23 21:32:29 +02:00
Samy Pessé e29fb2091e Start generating metadata for the page 2023-10-23 00:05:13 +02:00
Samy Pessé 68d198f255 Start search button 2023-10-22 23:57:36 +02:00
Samy Pessé 0b6910951d Start 2023-10-22 23:48:31 +02:00
Samy Pessé 0e90584911 Initial commit from Create Next App 2023-10-22 15:24:44 +02:00
751 changed files with 97782 additions and 9958 deletions
+1
View File
@@ -0,0 +1 @@
1.2.1
+8
View File
@@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix UI search without ask AI enabled and fix error with questions not returned from API
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix empty sitemap
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Support llms.txt
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Adapt code to pull token from customer backend generated custom cookies
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Add support for keyboard marks
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix search no results error showing while there are results
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Log component stack in Sentry
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Reintroduce a safety check around search whilst we continue investigating caching.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Track new events for site insights when ads are being clicked
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Apply antialiasing on any text that are not code inline/blocks to avoid contrast issues
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Handle security issue with cookies on Safari
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': minor
---
Add in HTTP example code blocks
+11
View File
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Investigate an issue causing caches to return empty objects instead of null/undefined.
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': minor
---
Add an optional client context to get a callback called when the Scalar client is opened for a block.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix vertical section overflow color
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Reduce gap between subsequent header buttons
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix pass Sentry release properly
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix shrinking page icons
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Add support for sidebar background styles
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Start using tint in more places, TOC and PageAside
+7
View File
@@ -0,0 +1,7 @@
---
'gitbook': patch
---
Ignore invalid API calls to `getSiteRedirectFromSource` API
To reduce the load on the API and also avoid errors.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Remove KV cache backend and only rely on DO as an external cache backend
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix default outline list styling
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Ignore errors from event flushing
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Simplify search results logic to investigate a bug
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Cache API spec for 24 hours, revalidated every 2 hours
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Try to fix error on og image generation
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Improve emoji setup, align with GitBook app
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Downgrade to Next.js v14 to fix incompatibilities with next-on-pages causing multiple bugs.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Fix an issue where the redirects of potentially malicious images were not going through.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix zoom image view transition on Safari
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Position the variant picker in the ToC
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Update footer styling and allow for more than 4 footer groups
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Make cookies access safer
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix Image blocks zoomable behaviour
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Handle Firefox security error on localStorage
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix errors from customization not found
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Improve contrast of search box placeholder
+6
View File
@@ -0,0 +1,6 @@
---
'@gitbook/react-openapi': patch
'gitbook': patch
---
Do not dereference before caching OpenAPI spec.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix regression issue with page icons for multi-line titles
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix OG image generation for non-latin characters
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Simplify the `useHash` algo used.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Ignore cache invalidation error from local backend
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Track events for site insights using the new dedicated API.
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': patch
---
Fix an issue where a response object using a special ref would crash the page.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Allow only good values for theme query parameter. Avoid having a 500 error when we pass an invalid value.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Improve colour contrast of list item decoration
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Set Sentry release
+6
View File
@@ -0,0 +1,6 @@
---
'@gitbook/react-openapi': minor
'gitbook': minor
---
Revert scalar to 1.0.87 to mitigate an issue with ApiClientModalProvider
+6
View File
@@ -0,0 +1,6 @@
---
'@gitbook/react-contentkit': minor
'gitbook': minor
---
Send redirectOnError param to getPublishedContent when token is pulled from cookie
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Restyle PageAside to use sidebar list styles
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-contentkit': patch
---
Fix potential invalid URL error in react-contentkit
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Avoid error on fetch by passing a string URL
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Generate sitemap for all sections and spaces
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Fix an issue where search and Ask AI triggers unnecessary renders when in a Visitor Authenticated site.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Track clicks on links (header, footer, content) for site insights.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Add feedback form to page rating control
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Update the routes for changes/revisions in multi-id mode to match the normal mode
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix code format overriding inline link styles
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix emojis display
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix server actions stability leading to no results found sometimes on search
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Lazy load iframely script to make page more responsive
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Cards stand out slighly more on tinted and dark mode sites, and have better support for headings inside them
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
New highlight colors
+7
View File
@@ -0,0 +1,7 @@
---
'gitbook': patch
---
Implement a safer way to interact with localStorage.
If it's disabled on the browser it should not throw error.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix search UI behaviour
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix two issues where pages would crash due Recoil not behaving correctly in RSC.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix dynamic tabs infinite loop
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': patch
---
Prevent codemirror from loading multiple versions in scalar
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix error when accessing a change request not found
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': patch
---
Improve performances by loading Scalar API Client only when the button is clicked
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix variant selector contrast for non-default themes
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix issue leading to increase the storage write and the stability of the platform
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Force route handler to be dynamic to avoid errors
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': patch
---
Updated scalar depdenency
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix search loading state
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Disable C/C++ highlight temporarily
+6
View File
@@ -0,0 +1,6 @@
---
'@gitbook/react-openapi': minor
'gitbook': minor
---
Fix internal properties appearing in OpenAPI docs.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix Sentry instrumentation
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Even safer localStorage
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Avoid errors on legacy browsers
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Add antialiasing for text rendering
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Improve readability of tables with hover style and vertical dividers
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Improve styling of header buttons with shadows and high-contrast styles
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix viewing PDF from space
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Image optimization endpoint redirects to underlying image URL if the signature is not the latest.
+8
View File
@@ -0,0 +1,8 @@
---
'@gitbook/react-openapi': major
---
Use `@scalar/openapi-parser` to be more resilient and perf on OpenAPI spec parsing:
- `fetcher.fetch` must now returns a valid OpenAPI document
- `parseOpenAPIV3` has been replaced by `parseOpenAPI`
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix bullet list display on full size blocks
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Vertical orientation for sections list on sites without header
+6
View File
@@ -0,0 +1,6 @@
---
'@gitbook/react-openapi': patch
'gitbook': patch
---
Improve OpenAPI rendering performances by caching markdown parsing
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Improve performances by highlighting code client-side if the code block is offscreen
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix error when accessing some not found pages.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix "Parser" language syntax highlighting
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Fix a vulnerability issue for images using an older version of the image signing parameter.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Track an event into site insights when visitor is opening the Scalar API client.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Upgrade Next.js to v15, upgrade Shiki and use JS RegExp engine
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix breadcrumbs emoji display + add contrast styles

Some files were not shown because too many files have changed in this diff Show More