-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
topbar: edit button supports page editURL param before site one #762
Conversation
Signed-off-by: Maxime Soulé <[email protected]>
I am willing to merge this and provide the necessary docs. Nevertheless I am interested in hearing more about your use case. In case of the global config, the file path will be (necessarily) automatically appended to the Users expectation may be the same for the |
The site I am handling is automatically generated with files from different foreign repositories and for each of them different tags. In addition only files originated from master (and no from any tag) are editable. |
I thought the suggestion was interesting. I have built a repo structure that follows the logical structure of my lecture and is intended to be read directly by humans (GitHub preview w/o any "bling bling"). In order to be able to build a nice lecture website from this, I have to convert this structure into the typical Hugo structures in a pre-processing step. This is why the usual |
@cagix @maxatome Thanks to both of your for the input. In both cases, it makes sense to define the full URI in the frontmatter. Nevertheless I am thinking about to provide a replacement parameter for the file path, so you could either define a full URL like As there isn't any text replacement yet in the theme or in (as far as I know) in Hugos API, I am open for the syntax of this replacements. |
@McShelby That actually sounds pretty neat! Thank you! In my use case, I wouldn't need any replacements - I would just set a variable in the YAML header of each Markdown file with a custom (externally calculated) URL as part of the pre-processing step. So it would be sufficient for me if I could access a corresponding variable in each document. |
i'd give no. 4 (javascript) a go, too - that reminds me of the good old Makefile syntax 👌 |
@maxatome I don't like the |
The rationale is that sometimes a page could be edited using a different URL than the declared site schema.
With this PR, a page can override the global URL schema giving its own already complete URL.
It also allows not to set the site editURL param, but only set it in a few pages that can be edited.
The docs have to be changed, but I wanted to check whether the idea is worth it or not before doing it.