Commit graph

36 commits

Author SHA1 Message Date
Max
413fd71841 feat(middleware): add support for markdown content negotiation and rendering
- Implemented content negotiation for markdown files based on URL suffix and Accept header.
- Introduced a new RenderRaw method to serve raw markdown content, bypassing HTML rendering.
- Updated PageConfig to include a handler for markdown output, enhancing flexibility in content delivery.
2026-04-02 18:55:36 +08:00
Max
621290d578 Enhance guard handling and template configuration merging
- Update the OAuth guard to prevent automatic response writing on failure, allowing for custom error handling.
- Introduce a mechanism to register default guard redirects from template configurations, improving guard management.
- Refactor the page configuration merging process to prioritize page-specific settings while allowing inheritance from templates.
- Ensure guards can be explicitly disabled in page configurations, enhancing flexibility in guard application.
2026-02-15 16:34:31 +08:00
Max
f7b8e970b2 Refactor Logging in Request Render Method
- Removed the dependency on the color package for logging warnings about uncached pages.
- Simplified the logging statement to directly use the log package, improving code clarity and reducing unnecessary imports.
2026-01-12 11:02:15 +08:00
Max
c425b74383 Refactor error handling in various components to improve logging and message formatting
- Updated error messages to use fmt.Errorf with %s for better clarity and consistency.
- Enhanced logging statements to utilize formatted strings for improved readability.
- Refactored multiple Load functions across different modules to standardize error handling practices.
2025-09-28 10:24:17 +08:00
Max
e59dacefa2 Improve error handling in request value execution
- Modify request value execution to log errors when method calls fail
- Prevent propagation of errors during value resolution
- Update error message in data merging to be more descriptive
2025-03-06 10:48:27 +08:00
Max
896e52a52a Fix PublicRoot bug and get Sid from request 2024-09-25 08:25:37 +08:00
Max
ddb337847e Refactor request guard to include page backend script execution 2024-09-24 08:00:05 +08:00
Max
fc1f80e0f5 feat: Add sourceRoots to Static struct in types.go 2024-08-01 18:16:59 +08:00
Max
6bcede11d9 Refactor SUI core to handle backend script errors during page execution 2024-07-26 16:02:35 +08:00
Max
7706439f8f Refactor SUI core to copy the script pointer to the request for page backend script execution 2024-07-25 19:07:50 +08:00
Max
276f29d777 [feat] SUI support BeforeRender hook for dataset processing, and deprecating the s:set method. 2024-07-25 17:56:40 +08:00
Max
58ca39a32b [feat] Sharing the Constants variable between frontend and backend scripts 2024-07-25 15:37:23 +08:00
Max
08f3fbc1e4 fix sui page locale and theme data caching bug 2024-07-16 04:53:01 +08:00
Max
b85e5eecd8 Fix the bug in the SUI language pack path 2024-07-15 16:57:28 +08:00
Max
a4f28368d4 refactor: Update build process to include SUI CompileAsComponent support (dev) 2024-07-05 19:54:26 +08:00
Max
671bba4aa4 [add] SUI language pack support (dev) 2024-06-28 11:25:22 +08:00
Max
c3644380ba refactor: Update Request struct to include data caching functionality 2024-06-27 21:11:38 +08:00
Max
6dcd704ea4 [add] Configuring SUI page caching to optimize static page loading speed 2024-06-27 20:02:03 +08:00
Max
a52f0ed1a4 refactor: Update Request struct to use NewData method for setting data 2024-06-26 18:19:51 +08:00
Max
0a5105b9d0 refactor: Update TemplateParser to support debug mode and DisableCache 2024-06-26 17:09:41 +08:00
Max
a1de910337 [add] support for retrieving cookies in sui Request struct 2024-06-25 19:37:55 +08:00
Max
a48c4cbe7d Refactor middleware and request handling code 2024-03-19 13:58:43 +08:00
Max
2effd3c360 Update authorization error messages 2024-02-20 20:07:26 +08:00
Max
6ca148d76c Add support for rendering request data in template parser 2024-01-21 00:04:58 +08:00
Max
5ba6bfe749 Update Guards to accept Request object instead of gin.Context 2024-01-03 18:31:58 +08:00
Max
76d9811048 Add guard functionality and export page config 2024-01-03 18:03:27 +08:00
Max
a4a639568d [add] Update V8Go repository in GitHub Actions workflows 2023-12-22 20:43:35 +08:00
Max
243b0707a7 [add] refactor template parser to support printing data 2023-12-17 12:02:47 +08:00
Max
bd798b03cc [fix] Refactor URL handling in NewRequestContext and parseArgs functions 2023-12-16 14:01:46 +08:00
Max
7b11ea82f0 [fix] route matching errors, reload matchers 2023-12-13 13:03:06 +08:00
Max
9eccf9b802 [add] URL details to request context 2023-12-11 10:04:08 +08:00
Max
07dfc90d2e Refactor middleware to handle Sui files and fix potential errors 2023-12-10 12:38:55 +08:00
Max
8698c42607 [add] SUI Template Engine command 2023-12-07 23:14:39 +08:00
Max
5bce0f6081 [add] sui template global data support 2023-11-24 13:55:22 +08:00
Max
b0e94e3d73 [add] sui page render (dev) 2023-11-23 17:16:51 +08:00
Max
dc91443217 [add] sui page route parser 2023-11-23 13:00:07 +08:00