Skip to content
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

doc: add in guide generation using remark #5408

Closed
wants to merge 1 commit into from
Closed

doc: add in guide generation using remark #5408

wants to merge 1 commit into from

Conversation

kahwee
Copy link

@kahwee kahwee commented Feb 24, 2016

Do not merge.

I did not commit in node_modules. This intends to generate guides, it is related to #4866. This generates HTML from MarkDown and implements highlight.js.

Currently it generates building-node-with-ninja.md into corresponding HTML.

To run it:

cd tools/doc
npm i
cd ../../
make docguide

This differs from #4866 by being group processing Markdown guide files.

CC: @nodejs/documentation

By the way, if I commit in node_modules, there are a lot of files going in. Is this an approach we should proceed with?

*Do not merge.*

I did not commit in node_modules. This intends to generate
guides, it is related to #4866. This generates HTML from MD
and implements highlight.js.
@Fishrock123 Fishrock123 added wip Issues and PRs that are still a work in progress. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Feb 24, 2016
mdast = processor.run(mdast);
const html = processor.stringify(mdast, remarkOptions);
// Locate YAML front matter
if (mdast.children[0] && mdast.children[0].type === 'yaml') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use a YAML parser such as js-yaml? Currently this code wouldn't support the full YAML specification, which could be confusing for people expecting to be able to write true YAML within the docs.

@silverwind
Copy link
Contributor

Regarding node_modules, I'd suggest

  1. install them with NODE_ENV=production npm install
  2. clean them up with https://github.com/inikulin/dmn
  3. commit them

Of course, the less dependencies and files, the better :)

@silverwind
Copy link
Contributor

Of course, we could also go the route of requiring the user to install the dependencies if these guides are not part of the release build.

@Fishrock123
Copy link
Contributor

I'm inclined to prefer not having them checked in, so long as the website build is able to work with that.

@Qard
Copy link
Member

Qard commented Feb 25, 2016

I think we can actually leave YAML parsing out of this entirely for now. It's mainly for eventually replacing the reference doctool that we want YAML frontmatter for. We can get to that later though. For now, we just want something that can build only the guide files in a way that it can be delivered with each release build to the website.

@jasnell
Copy link
Member

jasnell commented Mar 21, 2016

What's the status on this one?

@Qard
Copy link
Member

Qard commented Mar 22, 2016

@kahwee Are you able to continue working on this? I can volunteer some time next week to help get this ready to merge, if you aren't able to get it finished up yourself.

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Apr 19, 2016
@eljefedelrodeodeljefe
Copy link
Contributor

@Qard will you find some time to pick this up? I guess it's blocking a lot of new doc stuff. Also we would need to continue discussion where guids will go on the website afterwards, right? cc @nodejs/documentation

@Qard
Copy link
Member

Qard commented May 2, 2016

I'll see what I can do. I don't have a ton of time available at the moment though, so I'd appreciate any help I can get. If other docs people could review this PR and see if they can put together any of the other modules we might need, that'd be a big help.

@eljefedelrodeodeljefe
Copy link
Contributor

Alright. No pressure. I think I got some time tomorrow.

@eljefedelrodeodeljefe
Copy link
Contributor

Okay I have picked this up.
If nobody objects I am gonna close this, for a couple of reasons:

  • adding remark as dependency might not be necessary and is unwanted from what I hear.
  • the doctool needed general refactoring to make this integrateable easily without using remark
  • I am conducting refactoring here: doc, tools: refactor html generation  #6974 and will pick this here up directly afterwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. stalled Issues and PRs that are stalled. tools Issues and PRs related to the tools directory. wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants