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é
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é
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
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
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é
a7d4896484
Process all pages to fetch the list of spaces in a collection ( #164 )
2024-02-15 17:32:20 +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é
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é
1c0ea074b3
Update API client and fetch API blocks in new format only ( #137 )
2024-02-07 18:19:30 +01:00
Samy Pessé
9d9040f24e
Fix error for redirects/files on change-requests ( #113 )
2024-01-23 21:38:28 +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é
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é
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é
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é
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é
e04d03c696
Remove cache tags for documents
2023-12-19 19:31:14 +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é
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é
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é
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
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é
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é
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é
84fd934fe1
Try custom cache ( #9 )
...
* Try custom cache
* Fix redis cache
* Comment
2023-11-21 21:19:08 +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é
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é
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é
208dca6bab
Start supporting collections
2023-11-04 15:18:30 +01:00
Samy Pessé
abb3ed132a
Start theming header
2023-11-03 22:58:04 -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é
1e389fca86
Use cache and fix crash in TOC
2023-11-03 21:03:38 -04:00
Samy Pessé
0b6910951d
Start
2023-10-22 23:48:31 +02:00