Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

links inside the table are not being proceeded by recommonark #18

Open
ztomsy opened this issue May 7, 2019 · 3 comments
Open

links inside the table are not being proceeded by recommonark #18

ztomsy opened this issue May 7, 2019 · 3 comments

Comments

@ztomsy
Copy link

ztomsy commented May 7, 2019

if i try to insert links into table and it seems that it being proceeded in html conversion process, so later recommonark could not proceed it as md links.

example:
md src:
image

finally rendered as:

image

will very appreciate for advice how to fix it

@ryanfox
Copy link
Owner

ryanfox commented May 29, 2019

Couple ideas:

  1. When writing your source files, you could replace the links to .md files inside your tables with the actual path to the final page - e.g. action_order.html instead of action_order.md in the case above
  2. You could automate it - maybe after sphinx runs, search for href=.*.md and replace with the correct url
  3. You could see if there is a later build stage that will work to replace the tables. The extension currently uses source-read, but there may be one that fires after sphinx rewrites the links. PRs are welcome if you find something that works for you.

@lanctot
Copy link

lanctot commented Aug 23, 2022

Hi all,

I am encountering this problem now in our project, and I've opted for @ryanfox's option 2:

You could automate it - maybe after sphinx runs, search for href=.*.md and replace with the correct url

It works wonderfully when I run it locally, but it's not working when I try to do it on the Read the Docs build.

Has anybody gotten this option working on Read the Docs? If so, could you point me to a configuration that works?

I have written up all the details on a StackOverflow question here: https://stackoverflow.com/questions/73455350/how-to-modify-documentation-built-with-sphinx-via-a-script-in-readthedocs-build

@lanctot
Copy link

lanctot commented Aug 23, 2022

I have found a solution to my problem... it's a mix between @ryanfox's solution (1) and (2). Actually, it's just solution (2), but do the rewriting of the markdown files pre-build rather than of the html files post-build. It's now working, commit details here if anybody's curious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants