NFDI4Chem / knowledge_base

A place for all knowledge regarding Research Data Management (RDM) in Chemistry
https://knowledgebase.nfdi4chem.de/
11 stars 27 forks source link

Links to files in assets not working #112

Closed sneumann closed 2 years ago

sneumann commented 2 years ago

Hi, in https://github.com/NFDI4Chem/knowledge_base/blob/main/docs/40_topics/70_machine-readable_chemical_structures.mdx#provide-machine-readable-data-as-supplementary-table there is a link written in mdx without trailling slash as:

Templates for this table are provide as [.ods](/doc/machine-readable_supplementary_table_template.ods)

The rendered HTML at https://knowledgebase.nfdi4chem.de/knowledge_base/docs/topics/machine-readable_chemical_structures/#provide-machine-readable-data-as-supplementary-table has a trailing slash resulting in a 404:

Templates for this table are provide as 
<a target="_blank" href="/knowledge_base/assets/files/machine-[...]3c033f.ods/">.ods</a>

There is some discussion in https://github.com/facebook/docusaurus/issues/2654 but I don't fully grasp what needs to be done where. Yours, Steffen

tilfischer commented 2 years ago

Further hints to a solution might be provided by the docusaurus docs: https://docusaurus.io/docs/api/docusaurus-config#trailing-slash

In docusaurus.config.js this is currently set to: trailingSlash: 'true',

jliermann commented 2 years ago

I will look into this issue. This property is set true on purpose as the link structure did not work without it and must not be changed without prior testing.

jliermann commented 2 years ago

Fixed with commit 5bd03543b605c4727a35446dc03e1d52e14df282

jliermann commented 2 years ago

Problem was solved with help from https://stackoverflow.com/questions/65307533/link-to-static-json-file/67637081