Markdown file resolver
- Description:
Markdown file resolver
- Source:
- Copyright:
- Nguyen Ly 2014-2024
- License:
- MIT License
(require("markdown-serve/resolver"))(urlPath, rootDir, optionsopt) → {string}
- Description:
File resolver utility
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
urlPath |
string | Relative URL path to file to try to resolve. Must start with a / and do not include the file extension |
|||||||||||||||||||||
rootDir |
string | Full path to root folder on file system that contains files to resolve |
|||||||||||||||||||||
options |
resolverOptions |
<optional> |
Optional options to specify default page name and file extension Properties
|
Returns:
Full path to Markdown file if it exists, otherwise null
- Type
- string
Requires
- module:path
- module:fs
Methods
module:markdown-serve/resolver(urlPath, rootDir, optionsopt) → {string}
- Description:
File resolver utility
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
urlPath |
string | Relative URL path to file to try to resolve. Must start with a / and do not include the file extension |
|||||||||||||||||||||
rootDir |
string | Full path to root folder on file system that contains files to resolve |
|||||||||||||||||||||
options |
resolverOptions |
<optional> |
Optional options to specify default page name and file extension Properties
|
Returns:
Full path to Markdown file if it exists, otherwise null
- Type
- string