Coder Social home page Coder Social logo

Doctool: Remark plugins about docs HOT 14 CLOSED

nodejs avatar nodejs commented on June 23, 2024
Doctool: Remark plugins

from docs.

Comments (14)

Qard avatar Qard commented on June 23, 2024

The current tool also handles the JSON output. So we'd need to be able to parse HTML comments for context data and identify traits of function signatures in headers.

I'm thinking it might actually be good to have something that can interpret YAML before any header to section metadata and just edit the docs to store the metadata it currently stores in a less bad way.

from docs.

chrisdickinson avatar chrisdickinson commented on June 23, 2024

I'm thinking it might actually be good to have something that can interpret YAML before any header to section metadata and just edit the docs to store the metadata it currently stores in a less bad way.

I am 💯 in favor of this — are you thinking of something like:

### Some node header
<!--
stability: 0
added: v0.12.0
deprecated: v4.0.0
-->

from docs.

Qard avatar Qard commented on June 23, 2024

Yes, that. We could put whatever arbitrary data into it and then add renderers to decide what to do with that data. 😊

from docs.

silverwind avatar silverwind commented on June 23, 2024

eslint-plugin-markdown might be a good fit to integrate into make jslint. markdownlint could be used for linting markdown itself, but I fear it might require another dotfile in the project root.

Edit: I see you're aiming for remark plugins, so if these can do the job, so be it. Still would be nice to have the CI go red on a linter violation 😉

from docs.

chrisdickinson avatar chrisdickinson commented on June 23, 2024

@silverwind I think markdownlint would also add a dependency on Ruby, which might be a bit of a tough sell. It should be relatively straightforward to make a remark plugin that uses eslint, though!

from docs.

silverwind avatar silverwind commented on June 23, 2024

Oh, yeah, a Ruby dependency kills it.

Regarding linting both markdown and code in markdown, I was thinking about adding a doclint target to the Makefile/vcbuild, so one can lint without building the docs, which is kind of important, especially because there's no vcbuild doc for Windows yet.

from docs.

Qard avatar Qard commented on June 23, 2024

I'm going to look into writing my own code block linter for this tonight or tomorrow night.

Also, 👍 for the doclint target. Should be easy enough to do. 😸

from docs.

Qard avatar Qard commented on June 23, 2024

Cleaner anchor text?

from docs.

chrisdickinson avatar chrisdickinson commented on June 23, 2024

@Qard User-defined anchors would be grand, though I don't mind just doing the hacky HTML thing, either:

<a id="human-defined-anchor"></a>

### Some section

An alternative I was poking around with was to create empty links and have a plugin pick 'em up:

### Some section [](#human-defined-anchor)

from docs.

Qard avatar Qard commented on June 23, 2024

I wrote a thing for running eslint on fenced markdown code blocks.

Actually, I wrote it to plug into another thing I just wrote for running any kind of linter on fenced markdown code blocks.

Next up: a YAML metadata parsing thing.

from docs.

kahwee avatar kahwee commented on June 23, 2024

Where's the repo with the tool to generate the docs? I can try writing the plugins needed for them too.

from docs.

Qard avatar Qard commented on June 23, 2024

The existing tool is in nodejs/node repo at tools/docs. The "new" tool doesn't exist yet, but I should hopefully have an in-progress PR up later today to start discussion.

I have so far been writing what I can as fully generic modules, and would like to keep it that way as much as possible.

from docs.

Qard avatar Qard commented on June 23, 2024

I'd like to discuss this in the call tomorrow. Specifically, how to achieve a project-focused build tool rather than single-file-focused and what the migration path for that would look like.

from docs.

Trott avatar Trott commented on June 23, 2024

Closing as this repository is dormant and likely to be archived soon. If this is still an issue, feel free to open it as an issue on the main node repository.

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.