-
Notifications
You must be signed in to change notification settings - Fork 7
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
Port from Gitbook to sphinx #21
Conversation
Live at https://neuro.polymtl.ca |
This comment has been minimized.
This comment has been minimized.
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.
What would the workflow be for making changes? Something like...
- Browse the website and notice a change you would like to make.
- Click on "Edit on GitHub" link.
- Click on the pencil "edit" icon.
- Make changes in GitHub's markdown editor.
- How would someone visualize their pending changes before merging them?
- Click "Create a new branch for this commit and start a pull request."
- The PR workflow will automatically build the changes.
- I see the workflow publishes the changes when
master
is updated. Can there be a workflow to render in-progress, pending changes without actually publishing them, as is done for PRs on RTD-based websites?
- I see the workflow publishes the changes when
- The PR is reviewed and approved.
- Who will review and approve the changes?
- How will new students know who to request a review from?
- The changes are now live on the website.
The developer in me likes this workflow! But, the "new lab student" / "lab advisor who's rushed for time" in me thinks that this might be too many hoops to jump through in order to make a change.
This comment has been minimized.
This comment has been minimized.
@joshuacwnewton wrote:
The edit link drops you directly into the editor ^_^
With 'show diff'; I don't know if we can have it turned on by default? Maybe it's an account setting we can advise people to use? The markdown diffs are pretty good!
No, just save directly to I really think we should discourage PRs for the wiki. Not everything needs to be code reviewed, not really. @joshuacwnewton wrote:
No. Github Pages is too simple to handle branches. However someone could fork the repo, and so long as they're working on I am also not against hosting on readthedocs especially if we do want PR previews. I have no horse in the RTD / Github race, they're both just companies to me; I demo'd this way because it meant one less credential to manage; and also PRs should be the exception not the rule. I realize the Github preview won't render identically to sphinx. But I'm betting here that these situations (weird syntax, custom embeds, etc) won't come up that often so we can live with just re-edit until it works. Basically I'm repeating what Julien said
Changes could also be previewed by building the docs locally if we really need to (say, the large refactor case). It's really not that inaccessible:
Waiting on the CI feedback cycle is a drag -- CI is best for final checks and publishing, not developing. We shouldn't be encouraging it for daily feedback. @jcohenadad wrote:
Oh, maybe! This sounds like something sphinx can do. There's a lot of options for the TOC. https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#cross-referencing-syntax says "If you prefix the content with !, no reference/hyperlink will be created." so, worth experimenting. @jcohenadad wrote:
lol I intentionally increased the size c39bb0e. Gitbook has larger TOC fonts so I thought I'd copy that. I thought one of the big reasons we liked Gitbook was that the TOC was extremely prominent and easy to navigate. We can undo it! @jcohenadad wrote:
Not during compilation, no. But I guess I could make that happen. I want sphinx to recognize README.md as index.html. Surely there must be a plugin that can do that. @jcohenadad wrote:
Just ignore it. Most systems handle emojis fine these days. Certainly anyone with a Mac or Windows and Android or iOS computer will. @jcohenadad wrote:
Oh interesting. Github has templates for issues and PRs but not for files. I guess we can just put team/_TEMPLATE.md and tell people to copy from it. @jcohenadad wrote:
This already uses MyST. That's how it works in .md at all instead of .rst. I tried using I think
We can limit the TOC depth with If we can't get the TOC to hang together just right then I won't advocate it. But if we can I hope we'll consider it. |
I'm happy to hear this. I wrongly assumed that you wanted a PR-based workflow (oops), but if we're committing directly to |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
As someone unfamiliar with Markdown, after 5 minutes with Nick, I have to vote in support of the transition. |
First off, thanks @kousu for your effort in porting our webpage! Here are some of my comments:
|
706bef5
to
e7694a2
Compare
This comment has been minimized.
This comment has been minimized.
68e7765
to
1e783d6
Compare
49a72cb
to
fa8db50
Compare
Personally, I would like to merge intranet.neuro into this wiki, and make this a relative link.
Lists have an easier syntax, especially since we only have one column in these tables. Maybe we'll have multiple columns again in the future, but I think at that point I will be scraping Github profiles to *generate* the content, and so prettiness will be irrelevant. But for now it is relevant.
This makes the syntax easier to work with, but doesn't change the rendered layout.
These icons are used in the Github Button and on /software.html; this just makes everything consistent. This migration was done with these ridiculous perl one-liners: perl -i -pe 's/\[\!\[(.*?)\].*\((https:.*)\)/[<i class="fab fa-\L\1\E" title="\1" aria-hidden="true"><\/i><span>\1<\/span>]\(\2)/' team/README.md && perl -i -pe 's/\[\!\[(E-Mail)\].*\((mailto:.*)\)/[<i class="fa fa-envelope" title="\1" aria-hidden="true"><\/i><span>\1<\/span>]\(\2)/' team/README.md
Just repeating the embed URL is what https://executablebooks.org/en/latest/meetings/index.html?highlight=calendar does, but that's pretty pointless: you still have to click the "+ Google Calendar" button in the corner on that page ...which is already visible in the embedded calendar. Now there's one link that prompts you to subscribe, if you're logged in to Google, and one that works with every other apps (because it's .ics)
Something is wrong with sphinx-book-theme in a way that broke when sphinx went from 4.2.0 to 4.3.0 this week.
Hey @kousu, both Gitbook and Sphinx look pretty similar to me. As for editing the pages, I don't have any strong preference between doing it from the Gitbook interface or in GitHub, so if you think it's easier for you to manage the Sphinx version, I think we should go with it. |
Emailed dnsmaster@polymtl.ca last night per instructions at https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain to switch our DNS to say
I had to tell Github about the change: 7b44c3f, then I had to go back to https://github.com/neuropoly/neuropoly-docs/settings/pages just now and wait for Github to be satisfied, and then reenable Force HTTPS: One weird thing: the cache timeout seems very long. Github only set an hour (3600s) timeout on their DNS records, but ours is 24 To work around this, I've put us to https://www.neuro.polymtl.ca. https://neuro.polymtl.ca is still, for some people, pointed at an internal webserver on campus, but it's got a redirect to www.neuro.polymtl.ca set up, so everything should just work for everyone. I'll undo this in a day or so so we can have the shorter URL again. |
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.
All of my requested changes were addressed a long while ago, so approving. 🙂
I turned down everyone's permissions on https://app.gitbook.io, and de-synced their copy: Once this is merged I'll delete the Gitbook project/group too. |
This doesn't actually do anything here right now, but was discovered in https://github.com/neuropoly/neuropoly-internal-docs/, which has sphinx-panels enabled. If we enable sphinx-panels here too, we'll need the same patch.
Fixes #20 (the way I want it to be fixed anyway; I'm open to suggestions and alternatives)