doc: git mv to .md

* doc: rename .markdown references in content
* doc: rename to .md in tools
* doc: rename to .md in CONTRIBUTING.md

PR-URL: https://github.com/nodejs/node/pull/4747
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: techjeffharris
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Robert Jefe Lindstaedt 2016-04-21 00:12:40 +02:00 committed by James M Snell
parent cff2a137f2
commit 0800c0aa72
50 changed files with 32 additions and 32 deletions

View File

@ -49,7 +49,7 @@ and built upon.
#### Respect the stability index #### Respect the stability index
The rules for the master branch are less strict; consult the The rules for the master branch are less strict; consult the
[stability index](./doc/api/documentation.markdown#stability-index) for details. [stability index](./doc/api/documentation..md#stability-index) for details.
In a nutshell, modules are at varying levels of API stability. Bug fixes are In a nutshell, modules are at varying levels of API stability. Bug fixes are
always welcome but API or behavioral changes to modules at stability level 3 always welcome but API or behavioral changes to modules at stability level 3

View File

@ -131,7 +131,7 @@ test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE)
--nodedir="$(shell pwd)" --nodedir="$(shell pwd)"
# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
test/addons/.docbuildstamp: doc/api/addons.markdown test/addons/.docbuildstamp: doc/api/addons.md
$(RM) -r test/addons/??_*/ $(RM) -r test/addons/??_*/
$(NODE) tools/doc/addon-verify.js $(NODE) tools/doc/addon-verify.js
touch $@ touch $@
@ -247,9 +247,9 @@ test-v8 test-v8-intl test-v8-benchmarks test-v8-all:
"$ git clone https://github.com/nodejs/node.git" "$ git clone https://github.com/nodejs/node.git"
endif endif
apidoc_sources = $(wildcard doc/api/*.markdown) apidoc_sources = $(wildcard doc/api/*.md)
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \ apidocs = $(addprefix out/,$(apidoc_sources:.md=.html)) \
$(addprefix out/,$(apidoc_sources:.markdown=.json)) $(addprefix out/,$(apidoc_sources:.md=.json))
apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets
@ -266,10 +266,10 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
out/doc/%: doc/% out/doc/%: doc/%
cp -r $< $@ cp -r $< $@
out/doc/api/%.json: doc/api/%.markdown $(NODE_EXE) out/doc/api/%.json: doc/api/%.md $(NODE_EXE)
$(NODE) tools/doc/generate.js --format=json $< > $@ $(NODE) tools/doc/generate.js --format=json $< > $@
out/doc/api/%.html: doc/api/%.markdown $(NODE_EXE) out/doc/api/%.html: doc/api/%.md $(NODE_EXE)
$(NODE) tools/doc/generate.js --format=html --template=doc/template.html $< > $@ $(NODE) tools/doc/generate.js --format=html --template=doc/template.html $< > $@
docopen: out/doc/api/all.html docopen: out/doc/api/all.html

View File

@ -16,7 +16,7 @@ experimental, and added for the benefit of IDEs and other utilities that
wish to do programmatic things with the documentation. wish to do programmatic things with the documentation.
Every `.html` and `.json` file is generated based on the corresponding Every `.html` and `.json` file is generated based on the corresponding
`.markdown` file in the `doc/api/` folder in Node.js's source tree. The `.md` file in the `doc/api/` folder in Node.js's source tree. The
documentation is generated using the `tools/doc/generate.js` program. documentation is generated using the `tools/doc/generate.js` program.
The HTML template is located at `doc/template.html`. The HTML template is located at `doc/template.html`.

View File

@ -1 +0,0 @@
@include _toc.markdown

1
doc/api/index.md Normal file
View File

@ -0,0 +1 @@
@include _toc.md

View File

@ -3376,7 +3376,7 @@ static bool ParseDebugOpt(const char* arg) {
static void PrintHelp() { static void PrintHelp() {
// XXX: If you add an option here, please also add it to doc/node.1 and // XXX: If you add an option here, please also add it to doc/node.1 and
// doc/api/cli.markdown // doc/api/cli.md
printf("Usage: node [options] [ -e script | script.js ] [arguments] \n" printf("Usage: node [options] [ -e script | script.js ] [arguments] \n"
" node debug script.js [arguments] \n" " node debug script.js [arguments] \n"
"\n" "\n"

View File

@ -1,6 +1,6 @@
Here's how the node docs work. Here's how the node docs work.
1:1 relationship from `lib/<module>.js` to `doc/api/<module>.markdown` 1:1 relationship from `lib/<module>.js` to `doc/api/<module>.md`
Each type of heading has a description block. Each type of heading has a description block.

View File

@ -5,7 +5,7 @@ const path = require('path');
const marked = require('marked'); const marked = require('marked');
const rootDir = path.resolve(__dirname, '..', '..'); const rootDir = path.resolve(__dirname, '..', '..');
const doc = path.resolve(rootDir, 'doc', 'api', 'addons.markdown'); const doc = path.resolve(rootDir, 'doc', 'api', 'addons.md');
const verifyDir = path.resolve(rootDir, 'test', 'addons'); const verifyDir = path.resolve(rootDir, 'test', 'addons');
const contents = fs.readFileSync(doc).toString(); const contents = fs.readFileSync(doc).toString();

View File

@ -15,7 +15,7 @@ var gtocPath = path.resolve(path.join(
'..', '..',
'doc', 'doc',
'api', 'api',
'_toc.markdown' '_toc.md'
)); ));
var gtocLoading = null; var gtocLoading = null;
var gtocData = null; var gtocData = null;
@ -75,7 +75,7 @@ function render(lexed, filename, template, cb) {
// get the section // get the section
var section = getSection(lexed); var section = getSection(lexed);
filename = path.basename(filename, '.markdown'); filename = path.basename(filename, '.md');
parseText(lexed); parseText(lexed);
lexed = parseLists(lexed); lexed = parseLists(lexed);

View File

@ -30,7 +30,7 @@ function processIncludes(inputFile, input, cb) {
if (incCount === 0) cb(null, input); if (incCount === 0) cb(null, input);
includes.forEach(function(include) { includes.forEach(function(include) {
var fname = include.replace(/^@include\s+/, ''); var fname = include.replace(/^@include\s+/, '');
if (!fname.match(/\.markdown$/)) fname += '.markdown'; if (!fname.match(/\.md$/)) fname += '.md';
if (includeData.hasOwnProperty(fname)) { if (includeData.hasOwnProperty(fname)) {
input = input.split(include).join(includeData[fname]); input = input.split(include).join(includeData[fname]);