-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat: use the new api proxy and improve embed shortcode #1159
Conversation
50a6c5a
to
dca2db5
Compare
README.md
Outdated
- [External modules](#external-modules) | ||
- [Solving Common problems](#solving-common-problems) | ||
- [References](#references) | ||
- [Filecoin Specification](#filecoin-specification) |
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.
Some VS Code plugin insists on adding the h1 from this doc to the ToC... I had to turn it off locally. I don't think we want it in the ToC.
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.
This is great! It can go in as is. A couple of suggestions
- UI nit: Can we have the UI for code examples match the look of figures, by adding a subtle border and reducing the font size a little.
vs
2: UX nit... If the src attribute of the embed shortcode was just the github url, authors could copy and paste from their browser url bar when adding new embeds, and the markdown would more explicilty show what it was refering to.
{{<embed src="github:filecoin-project/specs-actors/actors/builtin/cron/cron_actor.go" lang="go">}}
# vs
{{<embed src="https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/cron/cron_actor.go" lang="go">}}
it seems nice to have the source code be a little less tied to the details of how the shortcode is currently implemented.
Thinking about it now, each release will have the master version at the time of the CI run maybe we don't need this.... To give you more context im thinking about building history/versioning based in the Github Releases and IPFS deploys. |
Oh nice, i see. Well yes, as you said, I think you could use the github URL and the api could give the permalink to the latest commit at build time that the code snippet was pulled from. If an author wants to link to a specific commit that never changes, they can just use the URL for that commit on github. |
Ah nice thats even better, didnt think about that. 💚 you are the best @olizilla |
btw 34s npm run build in the CI 🥳 |
dca2db5
to
f6ab4e1
Compare
This is fantastic @hugomrdias!! |
This PR adds:
embed
shortcode using the Proxytitle
orsymbols
have permalinks{{<embed src="github:filecoin-project/specs-actors/actors/builtin/paych/paych_actor.go" lang="go" symbol="resolveAccount" title="Payment actor - Resolve Account">}}
{{<embed src="github:filecoin-project/specs-actors/actors/builtin/paych/paych_actor.go" lang="go" symbol="resolveAccount">}}
No more codecov timeouts or go modules errors in the CI 🥳. The Proxy server should always keep data cached but fresh.