
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
functional-docs
Advanced tools
Generate HTML files? Use them for documentation? Great, then this tool might be for you.
Here are a set of tests to validate your HTML output. These tests check if your image references are legitimate, if they have alt tags, if your internal links are working, and so on. It's intended to be an all-in-one checker for your documentation output.
This does not check for grammar or spelling mistakes, nor stylistic issues (e.g., typing e.g. instead of e.g.)...but it might one day.
Simple: install from npm:
npm install functional-docs
Then call a single function, runTests()
:
var funcDoc = require('functional-docs');
funcDoc.runTests([ './files'], {stopOnFail: false, ext: ".html"}, function(err) {
});
runTests()
takes three parameters:
stopOnFail
indicates if you want the testing to stop once a failure is found; defaults to false
ext
indicates the extension of the files you want to test; defaults to ".html"mapPrefix
: if images start with a /
, the test assumes it's at ./
. This is mostly for routing compatability with express.#linkToMe
)If you think about it, some tests can actually be run before you compile into HTML. For example, if I was writing documentation in Markdown (which I do), I could just check to see if ![]
was erronously references. I've grouped this distinction in folders marked pre and post.
Then I started thinking that users might write their docs in reStructuredText, AsciiDoc, Pandoc, or some other format, so I decided to just focus right now on the rendered HTML output, and concentrate on catching formats as time allowed.
FAQs
A documentation test suite for HTML files
The npm package functional-docs receives a total of 11 weekly downloads. As such, functional-docs popularity was classified as not popular.
We found that functional-docs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.