-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Remove tutorials #156
Remove tutorials #156
Conversation
Once the build has completed, you can preview your PR at this URL: https://fluxml.ai/previews/PR156/ |
Attempting to add redirects in last commit. But https://fluxml.ai/previews/PR156/getting_started/ doesn't work, although the file looks like https://github.com/FluxML/fluxml.github.io/blob/main/blogposts/2017-08-24-generic-gpu.md which does redirect. Is this a preview limitation? |
Since Flux 0.13.9 is tagged, this ought to be safe to merge. However, it would be nice if the redirection worked. I'm also not sure they point to the right place. Maybe some should point to the model zoo instead. |
This code is a bit annoying, but unfortunately, this is what keeps the previews working 🙂 Given that we store previews within the gh-pages branch (to avoid the extra Netlify infrastructure), it becomes important to ensure that the previews don't access the content of the stable website and vice-versa. |
For instance, if you go to the preview and click the "blog" button on the navbar, it will redirect you to the "blog" section of the stable website (because this PR now does not use relative links). |
I see. Is there any way to do that without duplicating the content? Define some variable which is either Otherwise having to typing the right path into the online preview (but not local ones) might still be preferable to having multiple copies of the same content which can have different mistakes... |
I'll try that! Stuck with my end semester examinations at the moment; we could either switch back to the weird |
Not very sure what is happening here. It should've worked. Will look into this. |
If restored, the if-else block need only wrap a few entries like blog, rather than duplicating everything. You don't have any ideas why the redirects are failing, by the way? |
As far as I can see, the GH Actions are building the redirected endpoints - https://github.com/FluxML/fluxml.github.io/tree/gh-pages/previews/PR156. But, no idea why the deployment is not showing them. |
But the endpoints should still work. |
Ah! This PR tries to redirect some pages, but there is no default redirect (or The GH Actions are producing the HTML files, but these HTML files are empty (as the markdown files are empty; Franklin does not understand The website, right now, uses (Not preview specific, the redirects will fail on the stable website too.) |
Are you saying that |
I might have explained the existing mechanism wrong. Technically, no "redirection" is involved in the blog posts and tutorials. The function For instance, if you go to https://fluxml.ai/blogposts/2018-12-03-ml-language-compiler/ (blog hosted somewhere else), the website will not redirect you. You will be shown an empty web page because the markdown file is empty. But, if you click on "Building a Language and Compiler for Machine Learning (December 2018)" on the "blogs" page, you will land on the correct URL (not redirection, the link itself is the link where the blog is hosted). |
Oh right, sorry, I see now. Ok, so copying that isn't really the problem. We don't need a page here which links to the new locations. The only reason to want redirects is in case people elsewhere have links to the existing pages. (Or google might.) Such redirects would have to be made by a different mechanism. |
I'll check on Franklin's GitHub or Slack if there is a nice way to do this. |
Bump -- https://twitter.com/owainkenway/status/1619003403765694465 is a recent complaint which I'm told is about old Flux tutorials being misleading. |
My message seems to have gone up on slack. I hope tagging @tlienart here would be okay. Just to reiterate, we want to redirect users from some specific endpoint to another. For instance, https://clusterinnovationcentre.github.io will automatically redirect you to https://clusterinnovationcentre.github.io/convoke/2023. This happens because <meta http-equiv="refresh" content="0; url=./2023/"/> Can we perform such a redirect (another website redirect instead of a relative URL redirect) using |
No problem, assuming you're using Franklin and not Xranklin (I'm on my phone so can't check) you can use |
Thank you! That should do! |
149a8bb adds something like that. But going to https://fluxml.ai/previews/PR156/tutorialposts/2021-10-14-vanilla-gan/ still loads a stub page here, rather than a page in the docs. |
You should remove the first part up to the path prefix (so everything before fluxml and including it) + add an explicit path all the way to .html (see here: https://franklinjl.org/syntax/page-variables/index.html#basic_functions) in your case it should be something like
where the ... is replaced with what you have in your commit after tutorials |
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 /stable/
is added automatically by your deploy script I think so you should remove that as well otherwise this is basically /stable/stable/...
Thanks for taking a look. But is this the right way around? The linked docs say "when a user goes to The meta tag above is instead placed on the old page (where you're removing content) to send readers elsewhere. The pages we would ideally like to send readers to are either in Flux's docs (generated by Documenter) or else in the model-zoo, a separate repository with README pages. |
Ah crap I misunderstood your problem it seems, what you put in your comment is right: with the
I think that was clear from your previous comment. Now if you want the reverse, i.e. you put the content on
at the top of In that case when a user goes to I hope this clears things up a bit for your use case. |
Ok I think I understand. But the point of this PR is no longer to attempt to host this code within the website at all (since it goes stale here). The hope was to send anyone following a link here along to either the model zoo (different domain, github README) or else to a page in the docs (same domain, Documenter). I believe that's what Saransh's meta code would do -- there isn't some way to embed a literal tag? Or can we use |
this is getting a bit tricky but doable, if you want all pages to redirect to some url (say URL) in your layout you can add something like
any page generated under tutorials will then act as a redirect to the same point. if you want each page to act as a redirect to a separate location, you can code this up in a |
(comment updated, meta refresh needs to be in |
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 this is a good idea. I would also remove "Discourse / Stack Overflow" for a link to "Ecosystem." The latter should be front and center IMO since we get a lot of people making feature requests or posts elsewhere for things that are in existing (not Flux.jl) packages.
Ah in fact https://fluxml.ai/previews/PR156/tutorialposts/2021-10-14-vanilla-gan/ does now redirect. I don't know what changed. But 1d13aa4 could then be done for other pages too. In another PR. |
Weird, I didn't see it in the preview earlier today, but I see it now. |
Weird indeed. Thanks @tlienart for your help with this! |
After FluxML/Flux.jl#2125 I believe we can delete the tutorial section here completely. Then we have code in two places, the docs + the model zoo, not three. As desired for instance here: #141 (comment)
Besides the 5 moved to docs already:
This PR also tries to clean up the navbar. The code had a baroque set of switches apparently to deal with relative paths from various places. I'm not certain what it should contain, but the first attempt is this (with current state on top, PR below):
At present that has no links to docs sub-sections. But perhaps it ought not to link to stack overflow / discourse, those are just links not things Flux owns. And could then instead have Ecosystem?
Edit, I see that #140 is also quite recent WIP. But this aims for the blog here, not the tutorials, I think.
Closes #122
Closes #132