Closed thomasdavis closed 8 months ago
Latest commit: 5b76460c160adcd642511b04a38100a036065d4c
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
[!WARNING]
Rate Limit Exceeded
@thomasdavis has exceeded the limit for the number of files or commits that can be reviewed per hour. Please wait 8 minutes and 21 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the @coderabbitai review command. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.Commits
Files that changed from the base of the PR and between 0d88e398822573e4d7b6d8e02ec09305e1d485b7 and 5b76460c160adcd642511b04a38100a036065d4c.
The updates introduce a comprehensive jsonresume-theme-full
package, which includes a new full
theme for rendering resumes. This theme is integrated into the registry app and utilizes Handlebars for templating. It features a variety of partials for different resume sections, extensive CSS for styling, and additional Handlebars helpers to support the rendering process. The changes are primarily additive, providing new functionalities for resume presentation.
File(s) | Summary |
---|---|
apps/registry/pages/api/formatters/template.js |
Added 'full' theme using 'jsonresume-theme-full' package. |
packages/jsonresume-theme-full/... |
Added new JSON Resume theme 'Full' with instructions, features, and usage details. |
packages/jsonresume-theme-full/partials/... |
Added various .hbs partials for resume sections like work, education, awards, etc., with conditional rendering logic. |
packages/jsonresume-theme-full/public/... , packages/jsonresume-theme-full/dev/... |
Added HTML documents with structured resume layout and inline CSS styles. |
packages/jsonresume-theme-full/index.js |
Introduced module for rendering resumes with render function and Handlebars helpers. |
packages/jsonresume-theme-full/style.css , packages/jsonresume-theme-full/dev/style.css |
Modified CSS custom properties, media queries, and various selectors for layout adjustments. |
.gitignore , .npmignore , .nvmrc |
Updated ignore files and specified Node version. |
packages/jsonresume-theme-full/resume.hbs |
Added HTML template for rendering a resume with various sections. |
packages/jsonresume-theme-full/style.js |
Updated CSS file with changes to variables, media queries, and element styles. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
jsonresume-org-homepage | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Dec 2, 2023 4:47am |
jsonresume-org-registry | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Dec 2, 2023 4:47am |
I do not think that this is turbo related. These functions will and should be packaged with webpack into one single .js file, probably compressed and minified etc. Hopefully sourcemaps are also present for debugging purposes. Using "readFile" in a serverless environment is simply "dirty" imo. Even if it would work, I would think of it as a hack, not using a real feature.
I have toyed with this and I think, there are certain problems to the current setup: We use nextjs to transpile the individual theme packages. However in order to publish them to npm, we need to transpile / bundle them with webpack / esbuild / rollup, you name it. These bundle steps will need certain configurations and potentially loaders like handlebars-loader which the registry package should not be aware of.
So in order to have things clean, I suggest to not have nextjs transpile the individual packages, but have nextjs use the output of the individual transpilation jobs. One would have to run the build --watch
script for all of these packages then, before one can dev
for the registry. This might eventually be a lot of jobs. There is also certain support from some of the packagers, at least there is from typescript, but setting this up is a little tricky and I could not find a proper example for a nextjs or typescript monorepo with turbo. Will keep an eye out. Until then I vote for running the build --watch
task on all the templates and during build of the registry, we first need to build all the packages, which is quite easy with turbo
and "dep": "^build"
(or something close to that).
So we can actually render handle bar templates on the server.
readFileSync
works, but cannot for the life of me figure out how to get the relative pathing working.Also should of moved the themes into a
themes/packages
folder but it was giving me grief.Going to merge this manually, but will make improvements to it.
Also need a nice way to give credit to the original author.
Edit: actually the readFileSync doesn't work when deployed to vercel
https://github.com/vercel/next.js/discussions/32236
When calling path.resolve, vercel should bundle the files but it doesn't.
Something to do with turbo i think
Summary by CodeRabbit
New Features
render
function for generating resumes using Handlebars templates.Enhancements
Documentation
Bug Fixes
Style
Chores
.gitignore
and.npmignore
to exclude unnecessary files from version control and package distribution.