-
Notifications
You must be signed in to change notification settings - Fork 35
Bring the website back into this repository #1028
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
Conversation
commit: |
cowboyd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put AGENTS.md into a .agents or something? I'd like to maintain root dir hygiene if possible
cowboyd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱 😱 😱
Nice!
@cowboyd unfortunately, according to https://agents.md, it has to be in the root.
|
|
638af3e to
8edb999
Compare
0e668c3 to
f8f1ebd
Compare
c30dfe1 to
ed3223e
Compare
Pull request was closed
We brought it out because of tooling concerns. We're bringing it back in because it makes it so much easier to work on
ed3223e to
b3019e8
Compare
|
Checks appear borked. |
Motivation
We wanted to bring the website back into effection repository since Deno now supports having multiple projects in one repository. In the process, we also added the ability to render the website by reading content from git repositories instead of via GitHub API.
Approach
It was actually quite a bit of work to be able to read content from git repositories, but it looks like the result was worth while. I'll explain how it works. There are 2 primary abstractions to do most of the heavy lifting,
Fetch API
The fetch API is based on middleware. I was originally going to use
@effectionx/context-apibut I couldn't because the website uses effection 3, so I copy and pasted it into this repository. The fetch API provides the base abstraction for reading contents from URLs. This is helpful when we need to read data from GitHub API or GitHub website URLs. For example, JSR references GitHub respository URLs. By using the fetch context API, we're able to use a standard interface for fetching data and configure that interface separately.Repository
Repository is an abstraction for working with repositories. There are two kinds: Git and Octokit. Git read from the file system and Octokit from GitHub API. Both providers are available for reading files, but only Git provider is used for reading files. Octokit provider is used for fetching stars. We should really publish the Git API as a separate package.