-
Notifications
You must be signed in to change notification settings - Fork 929
feat: nextrouter pkg to handle nextjs routing rules #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
dd6d315
Add in-memory fs example
bryphe-coder 33897e5
Integrate test server too
bryphe-coder b8d092c
Some initial test cases for files at root
bryphe-coder 9949261
Serve contents from filesystem
bryphe-coder fadc0b6
Factor router out
bryphe-coder 771f39d
Add recursive router building
bryphe-coder 78406b1
Hook up recursive case
bryphe-coder 50c72ba
Refactor to handle different file-serving cases
bryphe-coder 7a98a48
Handle case w/o html extension
bryphe-coder 1eb2402
Handle redirecting to index.html at root
bryphe-coder b0fd9a8
Add test case for nested path
bryphe-coder a506148
Remove now-unnecessary smoke test
bryphe-coder b59e2a8
Some clean up
bryphe-coder ff75695
Refactor to use http.ServeContent
bryphe-coder a410396
Simplify router construction
bryphe-coder 15c38b9
rtr -> router
bryphe-coder c813b5e
Handle serving non-html files
bryphe-coder 317c040
Handle trailing-slash case
bryphe-coder 133e452
Implement dynamic routing
bryphe-coder 6d8f412
Add test case to verify static paths are preferred over dynamic paths
bryphe-coder a3ecd7f
Handle dynamic routing for folders
bryphe-coder 700c9ef
Handle catch-all routes
bryphe-coder 05a369e
Start plumbing in a way to inject template parameters
bryphe-coder 03a20c1
Start adding plumbing for templates
bryphe-coder 199d468
Add template functionality
bryphe-coder ca515e4
Set up 404 handling
bryphe-coder 6072bad
Use nextrouter package in site, which simplifies it quite a bit
bryphe-coder 826eaf5
Update interface to take logger
bryphe-coder dac34f5
Additional comments
bryphe-coder 92d4eb0
Fix embed_test
bryphe-coder 5262b7f
Remove now-unused noop template func
bryphe-coder 33342e5
Merge main
bryphe-coder 750bec9
Switch route addition from info -> debug log level
bryphe-coder c15b046
Invert logic to remove layer of indentation
bryphe-coder c17fc15
Rename buildRoutes -> registerRoutes
bryphe-coder 34e4f46
TemplateDataFunc -> HTMLTemplateHandler
bryphe-coder 0743503
Add return to reduce indentation in serveFile
bryphe-coder 4585c13
Remove call to remove file extension
bryphe-coder 8f2b47d
Switch to register 404, return error and warn at toplevel
bryphe-coder 19fcfac
Move ./nextrouter -> ./site/nextrouter
bryphe-coder 8343923
Return error from handler
bryphe-coder 4a5c353
Change dynamic route logging from Info -> Debug
bryphe-coder e4d031f
Merge main
bryphe-coder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Set up 404 handling
- Loading branch information
commit ca515e47a46a95278d709f4a10ad984908a76570
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.