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

Get projects plugin to pick up new projects #6399

Closed
4 tasks done
alexvoss opened this issue Nov 27, 2023 · 4 comments
Closed
4 tasks done

Get projects plugin to pick up new projects #6399

alexvoss opened this issue Nov 27, 2023 · 4 comments
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@alexvoss
Copy link
Sponsor Collaborator

Context

When working with the projects plugin, a newly created project is not getting picked up. While it is relatively easy to trigger a re-build by touching the main mkdocs.yml, it would be nice if new projects were picked up automatically.

It is debatable whether this constitutes a bug or a change request. I went with the latter since this should not be blocker for anyone.

Description

I am proposing to add something to the configuration of the file system watcher that would identify a new subdirectory in the projects_dir. Looking at the documentation of the watchdog library used, it seems this should be possible.

Related links

Use Cases

This applies for any use of the projects plugin. It may be more important to some uses than others, since in some there will be plenty new subprojects being created all the time, while other users may have a limited and static set of subprojects.

Visuals

No response

Before submitting

@squidfunk
Copy link
Owner

Thanks for suggesting! I must say, I just love your usability suggestions – this one is definitely a must have.

@squidfunk squidfunk added the change request Issue requests a new feature or improvement label Nov 27, 2023
@squidfunk
Copy link
Owner

Fixed in f1cb613. 🫠 I've invested the last 4 days to refactor the projects plugin and pave the way for more complex interactions and modes between projects. Although I'm already happy with the result, there's still a lot of room for improvement, but I'll fix this on the way. The most important problem here was to improve the user experience.

Additionally, projects are now automatically resolved and built in topological order, which means that nested index pages are also possible now. I've developed a scalable approach that is based on tainting projects for rebuilding. Currently, a file change taints a project, and schedules it for rebuild in the next iteration, however tainting can also be done programatically.

What was particularly tricky was not only to pick up new projects, but to add them to the watched files, so that you can start editing right away. Bonus points for the "Rückrichtung": same is true for removing projects, so if you delete a project, it'll be automatically unwatched.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Dec 10, 2023
@squidfunk
Copy link
Owner

Released as part of 9.5.2+insiders-4.47.1.

@alexvoss
Copy link
Sponsor Collaborator Author

You are on fire, dude! Thanks for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants