-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite SSG in Node and frontend in Lit & Vite
After deciding on Web Components, Go types had to be duplicated in JSDoc syntax for the JS client code. Although rewriting the static site generation in Node makes SSG slower for a total build, the developer experience can actually be faster because reloading Web Components is fast. Initially native Web Components were working well, but the value of reactive state mounted. Lit Elements add reactive state to Web Component standards, so that, unlike React, it's a small dependency, and requires no build step. The client UI itself is now a two sidebar layout, both attached to the left of the viewport, each scrollable. One for filters, and one for results, with content being loading in the page body. Pagefind performance improves a lot with this commit following the adoption of an IntersectionObserver for loading data as discussed in CloudCannon/pagefind#371. Rurther reductions to initalisation times to follow with the proposed fixes in that issue. Client JS now uses modules (as opposed to synchronous plain JS) in the browser. This approach initially broke support for some older browsers, specifically iOS 16.3 and it's lack of support for import maps. To solve this Vite is now being used to compile client code in a way that's compatible with older browsers.
- Loading branch information
1 parent
38c87a2
commit c1322a2
Showing
101 changed files
with
6,807 additions
and
4,125 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ build | |
|
||
/.direnv | ||
/node_modules | ||
/nodebuild | ||
/json | ||
/dist |
This file contains 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 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 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 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
Oops, something went wrong.