Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Hugo website first draft #14
Hugo website first draft #14
Changes from 26 commits
64f9efe
4c980f2
cff91ac
716e3b8
8f00986
c37c071
695fbc0
d5b40f7
e4f64df
002ee47
a720730
d880003
be0de4d
e317087
99d74c3
f3cf9bf
fe9288a
c07b821
ffb26c1
7c7d73b
6c54e21
e33b9bb
d0208a2
3dac655
1c6dced
d4f2916
a5e7906
cd26eca
14a3eb1
40f917f
4fe0dbf
3f20704
d1bc2e4
a940c1e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do relative links not work here?
One issue with this is if they're browsing on one commit of the tree, then it could drop them to a different one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative from where to where? this is rendered as a html on
microsoft.github.io/mlos
so I'm not sure where you'd want to link from there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the top level
README.md
, so if I for some reason end up at https://github.com/amueller/MLOS/tree/hugo_website, then if I click the "Prerequisites" link, I will end up on your version of that page still. On the other hand the "source/Examples" link will now send me back to the original repo with a different revision.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I'm just asking where else it should send you for the rendered page, because there is no relative paths to the source, right?
I can also remove this but then there is no link to github from the rendered pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the rendered page I think we can send them to the
main
branch version as you outlined here - that makes perfect sense to me since they're already navigating from an external source.It was moreso can we do that (e.g. with more
sed
magic?) but still keep the relative links inside the git markdown?(the answer to that may be no)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how we would do that. Maybe if the link ends with a
/
it should go to github? But that seems super brittle and we probably also need to start using a markdown parser if we want to do these kinds of rewrites.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I see your point now. A hackish way I could see to do it would be to append an anchor to the link and then regexp replace those strings specially.
For instance:
sed -r -e 's|\(\.(/[^#]+)#mlos-github-tree-browse\)|(https://github.com/microsoft/MLOS/tree/main/\1)/'
However, your point about it being brittle is well taken and this is perhaps not worth it, so I'm fine if you just want to leave these as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the anchor is a neat idea, I was wondering how we could attach information to the link. But I think it's fine to leave as-is for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not the most specific regex in the world, but it works? hm should the
.
be escaped? I'm no good with sed