Skip to content
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

Merged
merged 34 commits into from Sep 1, 2020
Merged

Hugo website first draft #14

merged 34 commits into from Sep 1, 2020

Conversation

amueller
Copy link
Contributor

this is a very basic version of the hugo website, no sphinx yet.

cp ../LICENSE content/
cp ../README.md content/_index.md
mv content/documentation/README.md content/documentation/_index.md
sed -i 's/.md/\//g' *.md
Copy link
Contributor Author

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


## Examples

Code and documentation for examples of using MLOS to optimize a system are described in [documentation/03-ExampleUsage.md](./documentation/04-ExampleUsage.md) and in the [source/Examples](./source/Examples/) tree.
Code and documentation for examples of using MLOS to optimize a system are described in the [Notebooks](./notebooks/) section. Additional code is in the [source/Examples](https://github.com/microsoft/MLOS/tree/main/source/Examples) source directory.
You can find the source of the notebooks [on github as well](https://github.com/microsoft/MLOS/tree/main/source/Mlos.Notebooks).
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@bpkroth bpkroth Aug 31, 2020

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)

Copy link
Contributor Author

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.

Copy link
Contributor

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:

[source/Examples/](./source/Examples/#mlos-github-tree-browse)
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.

Copy link
Contributor Author

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.

README.md Show resolved Hide resolved
website/build_site.sh Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@bpkroth
Copy link
Contributor

bpkroth commented Sep 1, 2020

We should make a separate issue for tracking regenerating this and deploying it via CI.

@bpkroth
Copy link
Contributor

bpkroth commented Sep 1, 2020

We should make a separate issue for tracking regenerating this and deploying it via CI.

Also probably documenting how to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants