benbalter / jekyll-relative-links

A Jekyll plugin to convert relative links to markdown files to their rendered equivalents
MIT License
141 stars 37 forks source link

References to `subfolder/foo.md` don't point to html files. #92

Open mickeys opened 1 year ago

mickeys commented 1 year ago

Describe the bug

References to subfolder/foo.md don't point to html files.

Steps to reproduce the behavior

The following call - referencing a document alongside my top-level index.html - works as expected:

[User documentatioen](./README.md)
use after processing poits to
local http://127.0.0.1:4000/README.html
remote https://nfttix.github.io/README.html

Subfolders, on the other hand, don't get the same treatment. Each of the following:

[fail](./my-account/README.md)      # ./foo/bar.md
[also fail](/my-account/README.md)  # /foo/bar.md
[more fail](my-account/README.md)   # foor/bar.md
use after processing poits to
local http://127.0.0.1:4000/my-account/README.md
remote https://nfttix.github.io/my-account/README.md

Expected behavior

Each of these variants will point to the README.html instead of README.md.

Screenshots

N/A

Additional context

Versions are pegged to Github Pages' dependency versions.

$ ruby -v
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-darwin22]
$ bundle exec jekyll -v
jekyll 3.9.3
$ sw_vers
ProductName:        macOS
ProductVersion:     13.3.1
ProductVersionExtra:    (a)
BuildVersion:       22E772610a
$

Gemfile excerpt

gem 'github-pages', '228', group: :jekyll_plugins
group :jekyll_plugins do
  gem 'jekyll-relative-links', '0.6.1'
end

_config.yml excerpt

plugins:
  - jekyll-relative-links
relative_links:
  enabled:     true
  collections: true
JJ commented 9 months ago

Does that happen always with links in subfolders? Or could it be related to #93?

tot-ra commented 1 month ago

I seem to have the same issue. Used same config described above, but links point to .md instead of .html:

https://github.com/tot-ra/tot-ra/blob/main/index.md https://tot-ra.github.io/tot-ra/