-
Notifications
You must be signed in to change notification settings - Fork 34
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
Transfer the N-API tutorials into the OpenJS Foundation #391
Comments
Hi everyone. I'm posting this here for comments and discussion during our weekly team meeting. |
How about moving it to https://nodejs.org/en/docs/guides/? |
@vweevers another option might be a new tutorials section in the website? |
Guide, tutorial, potato, potahto, I think? The reason I suggested it is because there's no setup involved. It's a matter of copying markdown files. If certain aspects like navigation need to be spruced up then existing guides will benefit from that as well. |
I'd like whatever we do here to be of benefit to the larger Node.js community. |
During our weekly call today, @gabrielschulhof mentioned that Node Core has discussed RunKit for documentation. There is an issue here: nodejs/node#21723 |
As a first step, while we're deciding on a specific publishing strategy, I'd like to migrate all the example code used in the tutorials to the nodejs/node-addon-examples repo. Here's the table of existing examples:
My plan is to work on migrating my examples, as shown above, to @NickNaso and @KevinEady would you like to migrate the examples you supplied? I'm also happy to do it. |
Options for where to publish the workshop elements
Based on the discussion we think the best fit is the node-addon-examples repo. |
The idea is a new sub-directory called "tutorials" which would then have a directory for each tutorial. |
Hi @jschlight , I have migrated the example to a working package in node-addon-examples, pr nodejs/node-addon-examples#127 I stuck with the same structure (addon.js, .cc, ...) so the file names do not match exactly from the tutorial but I think that is okay 😄 |
Jim landed PR to get examples into node-addon-examples last week. As next step he's going to document proposal for getting the labs into one of the repos/website etc. |
The first example of the content migrated to a static website using Gatsby is available for review at: https://xenodochial-meitner-2e429e.netlify.app/content/about/what It still needs a lot of work, but I wanted to get this preview up for comments and suggestions. |
We probably need a search function. |
Also we can use github action to auto-deploy it https://github.com/nodejs/node-addon-api/pull/691/files#diff-2bf3c905e9c6203095ea31e889d43bfbR22. |
@jschlight I found a nit: https://xenodochial-meitner-2e429e.netlify.app/content/build-tools/cmake-js |
https://xenodochial-meitner-2e429e.netlify.app/content/build-tools/node-gyp Python 2 part can be removed. Not sure Gatsby is final choice. Any thought on https://docusaurus.io/en/ ? |
We're looking at Gatsby because it's used by https://nodejs.dev. I will look at Docusaurus, too. |
We had considered Gatsby first as it is being used by the Node.js redesign team and some consistency is good but will be interested to hear what @jschlight reports/thinks. |
I've deployed a new preview: https://admiring-dubinsky-535d79.netlify.app/ This preview is generated from Gatsby using a different template from the one before. The big difference here is that the code samples are now embedded directly from examples repo. We can discuss this site during the next N-API team meeting. |
The site is now published from my fork to GitHub Pages: https://jschlight.github.io/node-addon-examples/ The site is published to the The next step is to create the GitHub Action necessary to automate the build and deployment of the site. This will be a challenge since the GitHub Action will need to commit and push to the |
@gengjiawen I looked at Docusarus and it is a very nice piece of work. I particularly like that it is focussed on documentation. I'm continuing to proceed with Gatbsy for a couple of reasons:
A search function is beyond my capabilities at the moment. My plan is to reach out to the Node.js redesign team, which has about 100 contributors, to see if there is contributor there who can add search for us. It doesn't look that difficult to add, but it does require an in-depth understanding of Gatsby which I do not have at this time. |
@jschlight Thanks for the info. |
The licenses for the website, based on Gatsby, are as follows:
The |
Background notes on licensingThe contents of the Under the terms of the MIT license, I then modified the files in the |
The PR with the website contents is very close to landing. The steps shown here will make it possible to rebuild and publish the website on every merge to the 1. Create an orphan
|
Actually, no token is needed. We can use github action for this. See https://github.com/nodejs/node-addon-api/pull/691/files. |
@gengjiawen The link to your GitHub Action is very helpful. It appears a value is passed in as |
It's auto injected by github action, so nothing is need to config :) With this github action, it can also auto publish github pages when merged doc to master branch. |
@jschlight I've completed the steps in : #391 (comment) and it looks like https://nodejs.github.io/node-addon-examples/ shows the right content. |
@mhdawson Looks good! Thank you! The PR above adds the GitHun Action to rebuild and publish the site whenever there's a merge to `master. |
Done, its in place and gets automatically rebuilt when it a PR is made to the examples. |
Background
Since February 2018 I've maintained a website called The N-API Resource. The objective has been to have a central resource that contains guides that go beyond the basic core documentation. We've used this website to support the three N-API workshops we've presented so far.
When preparing the N-API workshop for the 2019 Node+JS Interactive conference in Montreal, it became clear that the complexity of the topics the website needs to address now exceed my capacity. Thankfully, other members of the N-API team stepped up to prepare content for the site.
As we collaborated on the tutorials, the weaknesses of the existing publishing model become apparent. The review process is clumsy and non-standard and a single person (me) has become a bottleneck.
Based on this experience, I'd like to see if we can move the content of the existing website under the auspices of the OpenJS Foundation.
I'm happy to take the lead on this project if we decide to move forward.
Basic Assumptions
I'm assuming that we want to maintain Markdown and supporting documents in a repository and then publish these Markdown documents as a navigable and searchable website. The "website" might be a single-page browser application that presents content directly from the Markdown and supporting documents on the repository. Or it could be a traditional static website.
I also assume I'll take responsibility for transferring the existing content to the new solution.
Moving forward, I'd like to see the content take a more "problem solving" approach. Instead of trying to describe a particular technology, I'd like to see the site explain how the technology solves a particular problem the developer is trying to solve.
If there are other approaches or concerns, we should discuss them.
Objectives
https
Plan
Alternative Publishing Platforms
hexojs/hexo
This is the Node.js tool I've used to publish the existing website. It takes Markdown and YML documents in specific directories and generates a static website in another specific directory that can be hosted just about anywhere. The current website is hosted on Amazon S3.
One of the nice features of this tool is that it populates the source code boxes in the documentation with the current source code when the static site is generated.
The hexo tool also includes a Node.js-based development server that permits you to view documentation updates in real-time on a website served by the development server.
Hexo website.
docsifyjs/docsify
This tool creates a Single Page Application (SPA) that retrieves markdown files directly from a Github repository.
docsify website.
docpress/docpress
This tool creates a Single Page Application (SPA) that retrieves markdown files directly from a Github repository.
docpress website.
egoist/docute
This tool creates a Single Page Application (SPA) that retrieves markdown files directly from a Github repository.
Docute website.
mrvautin/githubdocs
This tool creates a Single Page Application (SPA) that retrieves markdown files directly from a Github repository. It also has an option to generate a static website.
GitBook
Started as an open source project, GitBook is now a commercial product which is free for open source projects. It generates and hosts static websites.
Node.js
Does it make sense to look at the publishing approach used for the core Node.js documentation?
The text was updated successfully, but these errors were encountered: