Skip to content

Flatten directory structure: get rid of site/ and move website to top-level #169

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

Closed
wants to merge 6 commits into from

Conversation

rossbar
Copy link
Collaborator

@rossbar rossbar commented Jan 16, 2023

This is an idea inspired by #89. Currently, all the (non-executable) markdown source files for the website are stored in the site/ directory to keep the top-level directory tidy. However, the current organization also has unintended consequences, mostly due to the symbolic link back to the content/ dir:

  1. The use of symbolic links means the site can't be built on Windows
  2. The "edit this page" button is broken due to the symlink

The simplest way to fix the above issues would be to just do away with the site/ directory. That's what this PR proposes. The main downside is that the top-level directory becomes much more cluttered with sphinx-specific files/folders (e.g. _static) and site-specific files (e.g. all the .md files).

Are the benefits worth the tradeoff? Let me know what you think! In the meantime, I'm marking this as a draft.

PS - the diff is not very useful: you really need to be able to compare the old structure to the new. The easiest way to do so would be:

git add remote rossbar https://github.com/rossbar/numpy-tutorials
git fetch rossbar
git checkout --track rossbar/flatten-dir-structure

You can then bounce between main and flatten-dir-structure to see the impact on the top-level directory.

@rossbar rossbar added the question Further information is requested label Jan 16, 2023
@rossbar rossbar force-pushed the flatten-dir-structure branch from 26d90b5 to 3202b1c Compare January 16, 2023 07:54
@rossbar rossbar force-pushed the flatten-dir-structure branch from 3202b1c to 98dcbdf Compare April 20, 2023 18:04
@bsipocz bsipocz force-pushed the main branch 3 times, most recently from e2ff80f to 5d5889e Compare April 20, 2023 21:27
@rossbar rossbar force-pushed the flatten-dir-structure branch from 98dcbdf to 11eb4d6 Compare January 12, 2024 20:01
@rossbar
Copy link
Collaborator Author

rossbar commented Jan 12, 2024

I went ahead and rebased this one on main and will mark it as ready for review in case anyone wants to weigh in.

I moved the .md source files for the non-executable web pages to their a subdirectory (pages/) to help declutter the top-level directory. I also took the opportunity to rename content -> tutorials to better reflect what's inside the folders in the context of the new directory structure.

To summarize my take on this proposal:

Pros

  • Gets rid of symlinks, which makes this buildable on Windows and inside docker mounted volumes. Also fixes the "edit" button on the site

Cons

  • Clutters up the top-level directory somewhat.
  • The restructuring will cause merge conflicts for any open PRs which touch the tutorials (currently only 2)

@rossbar rossbar marked this pull request as ready for review January 12, 2024 21:56
@bsipocz
Copy link
Member

bsipocz commented Jan 22, 2024

@rossbar - could you rebase again, please?

@bsipocz
Copy link
Member

bsipocz commented Jul 15, 2024

I'm not sure how to proceed with this PR right now, maybe close and revisit after/during switching to mystjs, as I expect the switch requires some restructuring anyway.

@rossbar
Copy link
Collaborator Author

rossbar commented Jul 15, 2024

Agreed, the mystjs will indeed involve restructuring that supersedes this, so let's close it!

@rossbar rossbar closed this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants