velut

Joined 7 years ago

Karma
30
Submissions
18
Member since
Apr 30
GitHub: https://github.com/velut/
View on Hacker News

Recent submissions

Comment · 3 years ago
Comment · 3 years ago
Comment · 3 years ago
Right click inside a search box. There should be the option "Add a Keyword for this search".
Comment · 3 years ago
You can press Ctrl+K or type a `?` before the search query and Firefox will use your default search engine without expanding the bookmark macro.
Comment · 3 years ago
Comment · 3 years ago
Comment · 3 years ago
Comment · 4 years ago
Comment · 4 years ago
Hi,

I'm the author of the website mentioned by zebracanevra that does just that.

When a user requests the documentation for a package hosted on npm, a lambda function (Vercel/AWS) runs the analysis process using the TypeScript compiler.

The TS compiler is slow though and this process can take several seconds to finish for packages of medium and larger sizes (you can see the exact time at the bottom of a generated documentation page).

Comment · 5 years ago
Thank you!

Yes, I use prism-react-renderer for syntax highlighting.

I did not know about Shiki, but I'll look into it.

Comment · 5 years ago
Thank you for your question, I don't have experience with Docusaurus but I'll try to list a few ideas, let me know if it can help you.

If you only need raw package metatada (signatures, docs...) that Docusaurus will render somehow at build time you may use my extractor which outputs a plain Javascript object with the collected information (see https://github.com/jsdocs-io/extractor/blob/main/test/packag...).

If you need pre-rendered docs that Docusaurus will embed in a page you may implement something like a React component (see https://github.com/jsdocs-io/web/blob/main/src/components/pa...) and use the raw metadata as component props.

If you need a pre-rendered page that Docusaurus will collect, you may want to look into https://www.npmjs.com/package/@microsoft/api-extractor which can directly output Markdown files (as well as JSON files) but requires some initial setup to get working.

Comment · 5 years ago
Comment · 5 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton