
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Provides a basic toolkit for building simple markdown document pages with documents grouped by topic.
Docindex has very low dependencies:
Expects server to contain a JSON file in simple format describing docs and groups (JSON decorating with JS comments for doc and tutoring purposes, do not have these in your docindex.json):
{
"groups": {
"crafts": "Crafts and Arts",
"sports": "World of Sport",
"history": "Historical Events",
// ...
},
"docs" : [
{
// Title as it appears on Docindex accordion.
"title": "Ted Williams - Greatest Baseball Hero",
"urlpath": "ted_williams.md", // URL to doc (relative to curr page)
"grp": "sports" // Optional Group that doc belongs to (See "groups" above)
}
// ...
]
}
Format has following members and sections (on top level):
As further demonstrated by example docindex.json (above) the object nodes in "docs" have following members:
For "NPM Install" make sure you have either npm or yarn package manager installed on your system.
From Github:
git clone https://github.com/ohollmen/docindex.git
From NPM (If this made it's way to NPM):
npm install docindex
# ... OR ...
yarn add docindex
HTML Page that docindex uses must have 2 divs with specific id:s declared:
See section "Config Options ..." and "doclistid" and "docareaid" for configurability.
window.onload = function () {
// Create docIndex with settings overriden (as needed)
var cfg = new docIndex({linkproc: "post"});
// Load Doc index file and group listings data.
$.getJSON("docindex.json", function (d) { cfg.initdocs(d); });
};
Allow passing in configuration with:
Whenever defaults are good - you don't need to bothe passing anything.
There are 3 options to process URL Links to HTML Anchor ("a") elements:
Run any web server capable of delivering static content. You should be able to test your docindex.json by simply creating a symlink from your document directory to bundled docindex.html (e.g.):
# For NPM Install
ln -s node_modules/docindex/docindex.html docindex.html
# For Github install (Assumes docindex got cloned to
# subdir docindex of current directory)
ln -s docindex/docindex.html docindex.html
Example for running python (lightweight) web server - good at least for testing:
> python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
Access the page via URL: http://localhost:8000/docindex.html (Use as basename whatever name you created symlink by).
You either cloned docIndex from git or installed it by NPM (or yarn).
Flow for Git Install, run in the top level ("docindex") directory of the clone:
# npm or yarn install for dependencies
npm install
# Cannot Install docindex itself by NPM rules (npm install docindex) !
# So fake "docindex as dependency of itself" by a symlink:
pushd node_modules; ln -s .. docindex ; popd
# Usess included docindex file (docindex.demo.json)
# Run web server (of your preference, here minimal python web server for static content)
python -m SimpleHTTPServer
# Look at URL http://localhost:8000 with browser
Flow for NPM based install (for another app, which has docindex in package.json or by running npm install docindex woithout any package.json driving the installation):
cd node_modules/docindex
# Make appropriate symlinks
ln -s .. node_modules
# Or brute force install dependencies in sub-directories of "docindex"
# npm install
# Run web server ... (see above)
python -m SimpleHTTPServer
FAQs
Create Lightweight MD Document Listing Web Pages
We found that docindex 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.