Currently I am trying to add Chinese support to #131 Feat: \<Multilingual Platform> and found that absolute path references (such as [Quick Start](/signing/quickstart/)) are used extensively in the project.
It adds a lot of trouble to the translation work. I hope the document can optimize this writing method.
This way of writing does not comply with Hugo’s recommended engineering practices.
This adds a lot of trouble to the translation work. I need to pay attention to the reference structure of the document while completing the translation. I don’t think this should be something translators need to focus on.
Absolute path references are not ideal for documents that want to be structured and portable. It will cause some confusion, especially when multi-language documents need to consider the relative root starting point of the document address. This will cause great confusion.
Suggestions for Improvement
It is recommended that document references be improved to a relative path reference format to make them more flexible and portable. Here are some suggestions:
Use relative paths relative to the directory where the current Markdown file is located, rather than using absolute paths or relative paths to the root directory.
Combined with the relref function [^1], this will always generate relative path links relative to the content/{{ .Lang }} directory.
For example: Improved [Quick Start](/signing/quickstart/) to [Quick Start]({{ relref "signing/quickstart" }}) and its url will remain the same.
When this is implemented in multiple languages in the future, contributors can only focus on the document content itself without paying attention to the starting point of the document reference.
Provide a consistent description of the file directory structure in a document or project to help other users use relative path references correctly.
If you have any questions or need to discuss further, please feel free to contact me.
Problem Description
Currently I am trying to add Chinese support to #131 Feat: \<Multilingual Platform> and found that absolute path references (such as
[Quick Start](/signing/quickstart/)
) are used extensively in the project.It adds a lot of trouble to the translation work. I hope the document can optimize this writing method.
Suggestions for Improvement
It is recommended that document references be improved to a relative path reference format to make them more flexible and portable. Here are some suggestions:
relref
function [^1], this will always generate relative path links relative to thecontent/{{ .Lang }}
directory. For example: Improved[Quick Start](/signing/quickstart/)
to[Quick Start]({{ relref "signing/quickstart" }})
and its url will remain the same. When this is implemented in multiple languages in the future, contributors can only focus on the document content itself without paying attention to the starting point of the document reference.If you have any questions or need to discuss further, please feel free to contact me.
The following are relevant reference documents:
[^1]: Hugo documentation:
relref
function