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