-
Notifications
You must be signed in to change notification settings - Fork 161
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
Improve dataset URLs as defined within narratives #890
Comments
@jameshadfield: some comments on Nextstrain URLs that I've been running into. I realize that this might be a lot of things (or some of these might be more substantial changes to the code base) but this seemed like a good place to put them.
|
I talked about this with both of you separately, but I wanted to concur here that I think relative paths to datasets in the frontmatter and relative paths in each page's dataset URL would solve a lot of the issues. Particularly, it'd be possible, without changing any paths or adding any special handling to Auspice, to preview community or group narratives locally before pushing/uploading them. It also makes the three weirdnesses James described in the top post at lot less weird:
One thing to figure out is how a narrative refers to its default or "natural" dataset complement, which I think is important for community/group narratives but also some core narratives like ncov. Definitely welcome input and thoughts here. Particularly, I think it'd be useful for a community narrative on a specific branch to be able to refer to the dataset on that same branch, without explicitly naming the branch. This would allow, among other things, a nice convention for versioning. What I mean by default or natural dataset is:
One way the narrative could indicate this is by omitting the |
Relative paths seem like a good idea. @tsibley @alliblk could you help me understand what you have in mind here 👇
This seems like a nice idea, and seems to follow on from allowing relative links. As we add more features like this we just need to make sure we have very clear documentation. @alliblk could you elaborate on your point 3 - I don't quite understand. Is this at all what you mean: https://nextstrain.org/community/jameshadfield/scratch/
This does have some appeal. Originally, I designed the markdown with the intention that it's viewable as a markdown by itself (i.e. the headers would be valid links to what the paragraph describes), however relative URLs would also move us away from this original intention.
Not easy 😢 |
@jameshadfield Yes, https://nextstrain.org/community/jameshadfield/scratch/ is totally what I'd like to have and what I was trying to convey in point 3 :) |
Awesome! If you need help just let me know. P.S. for this to work you can't have a default dataset -- i.e. in my example there's no |
Thanks for starting that decision table. One thing is that the Tinkering with the table to think through this a bit more and get at the unclear cases, I think there's a fundamental tension between:
Agreed!
However, compare: https://nextstrain.org/community/jameshadfield/scratch/ to https://nextstrain.org/community/narratives/jameshadfield/scratch/.
Ah, I see. It's nice for the links to work in a narrative-naive Markdown render, but seems like it would also be nice not to require parts of the URL which are ignored by Auspice. I do think support for relative, query-only URLs would be additional to the current support for absolute URLs, so this would then be a decision by the narrative author. |
Narratives currently define a dataset URL in their YAML frontmatter and the title for each page.
The current implementation is ad-hoc:
nextstrain.org/ebola
will actually source the localhost dataset. This is because all auspice requests are made to the server the client's running from & only use the dataset pathname.localhost
ornextstrain.org
(this restriction should definitely be removed).This has become confusing for narrative authors as we build more narratives which rely on non-core datasets. For instance, whilst building a narrative for the community dataset nextstrain.org/community/scratch/ncov-demo, the file was stored locally as
scratch_ncov-demo.json
. This meant that the narrative URLs had to change between local development and deployment, from:to
(Confusingly the domain could be nextstrain or localhost for either, see above).
This problem exists for nextstrain groups as well.
The text was updated successfully, but these errors were encountered: