-
Notifications
You must be signed in to change notification settings - Fork 1
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
11 harmonize the nexus web pages convert the current wiki to use sphinx same as the main nexus documentation #14
base: master
Are you sure you want to change the base?
Conversation
…ormat documentation, still need to check and fix all dead links
Some points:
|
When I get some time to finish off the formatting issues (thi sweek hopefully) I will convert this PR back from draft for you to have a look at. |
I was thinking with my point 2 suggestion that using that sphinx extension allows you to leave the markdown content as-is (i.e. it does the conversion from |
ok I will check again because this was months ago that I had tried it maybe I missed something |
Here's another repo that builds its docs from .rst, .md, and .ipynb files. It's |
I must have missed something when I first looked at this its been so long I thought it was "the look" didn't change but the look is correct, regardless I am able to build the docs using myst_parser but there are numerous issues though, for instance the local file links do not render the href in such a way that the links work, instead it treats the local link as an anchor to the file it is referenced in. For example this is how myst renders the link specified in the .md:
As:
I spent the better part of the morning trying to configure myst_parser to treat the links as local links but no joy, the only way i was able to solve it was to have a function connected to app.connect('build-finished'...) walk all the generated html files and remove the '#' character from the href=. This approach works and does produce html files with links that work but during the sphinx build there are a ton of WARNING: 'myst' cross-reference target not found: warnings (among others) that is just one example. I have been approaching this from a build without warnings/errors but maybe I should ask do we care about warnings during the build? if not and we only care about functioning web pages then that would make this task much quicker, for me anyway. With the way I had been doing it (converting all .md to .rst) I am nearly done making all the files look nice (straight pandoc conversion from .md to .rst is not very readable), so I would prefer to just finish that off as opposed to trying to retain the .md files and sort out all of the issues which I don't think is going to save me any time, plus I had organized the files into some semblance of order as opposed to everything in the content directory which I also prefer. I freely admit that I'm no expert on this stuff so I don't have a problem if you guys want to take a crack at using the .md files I just think i am closer to being done the initial way and it more closely mirrors the manual documentation in terms of repo structure. |
I had a quick look at that link:
And it looks like
|
Hey @PeterC-DLS I had previously tried the following adjustments in conf.py without result:
and for treating all links as external I was assured by chatGPT (#facepalm) that the way to achieve that was to specify links like this in the markdown:
which it already was and which didn't produce a functioning link, ..but actually looking at the documentation for myst (shame) I found myst_all_links_external and setting it to True ...fixed the href and the links work although there are still a great many warnings to sort out. All that said I still prefer the converted files for the reasons I have already given, I am willing to do it either way but if the reason to keep everything in markdown was to save time on this task i would say that that ship has sailed :), and there would still be work anyway to get rid of all of the warnings and errors that are present during the build. |
I've had a hack this afternoon and fixed a few issues:
It gives reasonable output but needs re-arranging into the hierarchy that you had to get the H1 headers in place. As you note there's some plenty of cross-reference target not found messages in the sphinx output |
Oops, I forgot that I modified
|
to be clear I'm not saying that using the .md files and myst_parser wont work,
As I have mentioned there are still rst files that need a more readable format but I would like you and Pete to have a look at what I have and see if yawl agree with the md to rst conversion approach or not :) The one thing to note is that at the start of the build the logo files are retrieved from the nexusformat/NIAC repo so that they are always up to date with what the manual has. |
Your new structure is great for organising things compared to the current single directory. However, there's one unstated use-case that I think most people add new items directly via GH's web interface and are used to writing MD when adding new files. |
On a side note, it seems the conversion of the site from a wiki to Jekyll built static site was incomplete and lots of wiki links such as
when run on master. |
The old Vagrant based wiki files have been removed and replaced with a sphinx-build just like the standard nexus manual.
Closes #11
Using linkchecker I managed to resolve the internal links such that linkchecker does not report any issues but when I look at external links then there are a great many that have issues such as links to projects that used to exist when the markdown was edited, for example:
Project on Github <https://github.com/nexusformat/NIAC/projects/3>
__ etc.Being that the current wiki contains these broken links it is perhaps not an issue?, it would take significant effort to go through everything to remove/fix all of the link problems.
This will need some discussion at an upcoming NIAC technical meeting but before then this PR needs to be reviewed as it likely needs a few iterations.