jaywcjlove / jaywcjlove/markdown-to-html-cli

Links between markdown files are not renamed to .html in the output:

Open
#99 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
96
Forks
13
PR merge metrics
No merged PRs in 30d

Description

When markdown links have a `./` in them, html links are not adjusted.
Example:

README.md:
```markdown
Link to [details file](./details.md)
```

details.md:
```markdown
Link back to [README](./README.md)
```

In the generated output the links will be linked with .md extension instead of .html,

in the generated index.html we will get:

```html
Link to details file
```

and in the generated details.html we get:

```html
README
```

which won't work because README.md is converted to index.html

My config.json is as follows:

```json
{
"markdown-to-html": {
"document": {
"title": "Documentation",
"description": "Documentation",
"style": "body { color: red; }"
},
"reurls": {
"details.md": "details.html",
"README.md": "index.html"
}
}
}
```

I call the utility like this:
```
npx markdown-to-html-cli *.md --output "docs-generated" --config config.json
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the shown README.md, details.md, config.json, and npx command, then inspect the generated index.html and details.html. Trace the CLI's markdown-link rewriting entry point and its handling of ./ paths. Done means links between converted files use the configured .html targets rather than .md extensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, nodejs, typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.