-
Notifications
You must be signed in to change notification settings - Fork 63
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
Eliminate site
key in myst.yml
?
#1103
Comments
It sounds like my mental model of The way you describe it here sounds reasonable to me, at least as a starting point. It feels like this would be a natural progression to start with:
It sounds like @fwkoch's proposal is roughly following That said, I do think that websites expose a unique "configuration surface area" compared to most other exports, so it might be helpful to have a way to easily group website-related config1. Websites just tend to have a ton of bells and whistles, especially if you want to let people customize them with extensions or their own custom themes. Footnotes
|
We were previously working with multiple projects and composing those into myst sites in various ways but although it allowed you to do interesting things, it did get overly complex - stepping back to 1 project per This change though takes things further making the project the container or superset for potentially multiple sites and I'm not sure that makes sense beyond the Just left with the nagging doubt that maybe there was some other advantage of the separate |
We spoke about this change a couple of weeks ago, and I'm still in favour. I tend to think about MyST sites as "exports", so formalising that is something I'd support. I recognise that e.g. mystmd.org has multiple projects, but IIUC this is done using a different mechanism to Regarding @stevejpurves point, we could opt to make certain classes of exports singletons if like, such as sites. I don't see a reason to impose that limitation, but it's always available to us. |
I agree that assuming "one project per For future consideration, I'd like to see us make multi-project MyST sites by leaning into the MyST-as-data idea. For example:
|
One use-case I just thought of that might require some consideration. What do other folks think about this one: Multi-lingual MyST projectsWithin a book context (e.g. community knowledge bases), it is fairly common to want multiple languages of the same MyST project. For example, Would the decision in this issue result in users needing to maintain two separate MyST configurations for this? |
@choldgraf I am not so experienced in the norms in the space of multi-lingual projects. If it's desirable to separate different languages entirely, then perhaps we want to have multiple site exports and set a @fwkoch how do the ergonomics of that sound from the perspective of e.g. hosting multi-locale sites on a single vercel server? I'm thinking that the current direction that we're going in sounds like independent sites (one for each export). By the same token, I think we can also just move the |
My thinking was a structure something like this: English version
I wonder if we can learn from the way that Docusaurus or other heavy-duty docs / website frameworks handle this? |
Very much in favour of moving to a 1:1:1 mapping of I also want to echo what @choldgraf said on the importance of the site:
IMO, keeping a top-level For the internationalization, I think we can combine some thinking with #1123 to improve the sharing of important config elements (e.g. all the downloads), and having two My take away: there are not a lot (any?) user facing changes to this, but there are a ton of things we can remove from the code if we make this call, most of which are not in the docs (nested myst.ymls, traversing upwards to find if you are in a nested project, having a state that keeps track of your projects, loading the site and project configs separately, etc.). There is a ton of complexity in supporting this currently, especially around the config discovery and loading, which we don't advertise and won't need. The possible user facing change is that we could move from: version: 1
project:
title: My project
authors: []
site:
template: article-theme to treating a myst.yml as a single project always, and drop the version: 1
title: My project
authors: []
site:
template: article-theme Not too fussed about that change, and it is easy to change from a validation point of view after we have made some other decisions, but it might be nice to say "your myst project" rather than "the project in your myst project". |
IMO this is an easier structure to grok:
So I think I'm in favor of @rowanc1's proposal. It sounds to me like the only reason not to do this is if we think we're closing the door on some critical future functionality. But it doesn't feel like that's the case... And generally speaking, I think "reducing complexity" should be a guiding principle unless there's a clear value proposition for the functionality that would require the extra complexity. |
Closing this, as we have decided not to eliminate the |
Currently the
myst.yml
file has asite
key and aproject
key - there is lots of confusion around the difference between these, how inheritance may or may not happen, where new keys go, etc. (as one example, see the discussion on this PR: jupyter-book/myst-theme#325)If you look in the docs about frontmatter,
site
isn't even mentioned: https://github.com/executablebooks/mystmd/blob/main/docs/frontmatter.md In the code, there there isn't even avalidateSiteFrontmatter(...)
function; "site frontmatter" isn't really ever used. The closest we get is when building the "site manifest" we validate the frontmatter against the site theme template; this looks much more likeexport
validation than frontmatter validation.Why does the
site
section of themyst.yml
exist at all? I think the only reason for this comes from the idea that a site may have multiple MyST projects: https://github.com/executablebooks/mystmd/blob/main/packages/myst-config/src/site/types.ts#L72 - that meanssite
is a separate entity higher in the hierarchy than project.In practice, however,
project:site
is always1:1
, especially as we improve "intersphinx/inter-MyST" - there's no reason to combine multiple projects into one site; just link two sites.Because of all of this, I think it would be useful to eliminate the
site
from the project config. Configuringsite
would then work the same way as configuring anotherexport
- specify the format, a template, and any options required by the template.There would no longer be the same ambiguity around inheritance; project frontmatter is site frontmatter, and anything defined on the site
export
would overrideproject
frontmatter.The text was updated successfully, but these errors were encountered: