Skip to content

🛫 Add documentation for Landing Pages#1864

Merged
rowanc1 merged 9 commits into
mainfrom
agoose77/feat-landing-pages
Mar 5, 2025
Merged

🛫 Add documentation for Landing Pages#1864
rowanc1 merged 9 commits into
mainfrom
agoose77/feat-landing-pages

Conversation

@agoose77
Copy link
Copy Markdown
Contributor

@agoose77 agoose77 commented Feb 17, 2025

Note

This PR depends upon jupyter-book/myst-theme#531

This PR modifies our block transform to pull class and kind from .data, and adds documentation for the landing-page feature.

To try this PR out, build mystmd, and run it locally in the docs with e.g. env -C docs -- npx myst start --headless, then run the book-theme from the myst-theme PR.

Screenshot 2025-02-17 at 12-56-00 Landing Pages - MyST Markdown Guide

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 18, 2025

🦋 Changeset detected

Latest commit: 52e7f77

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
myst-transforms Patch
myst-cli Patch
mystmd Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@agoose77 agoose77 marked this pull request as ready for review February 18, 2025 12:15
@mmcky
Copy link
Copy Markdown
Contributor

mmcky commented Feb 26, 2025

genuinely excited for this feature. Thanks @agoose77

@agoose77 agoose77 changed the title 🛫 Documentation for Landing Pages 🛫 Add documentation for Landing Pages Feb 27, 2025
@agoose77
Copy link
Copy Markdown
Contributor Author

@rowanc1 note that if we use kind, it will mean that ipynb files that want to define landing pages will lose the notebook-cell block kind.

@choldgraf
Copy link
Copy Markdown
Collaborator

choldgraf commented Feb 27, 2025

What about block, since we are calling these "blocks" it would be more precise than "kind". E.g.

--- {"block": "blah-blah"}

Text

--- {"block": "blah-blah-blah"}

Text

please disregard this if I'm misunderstanding the problem!

@rowanc1
Copy link
Copy Markdown
Member

rowanc1 commented Feb 27, 2025

@agoose77 you can have blocks in blocks ... so I think this should be fine?

@agoose77
Copy link
Copy Markdown
Contributor Author

Er @rowanc1 our schema states that we don't support that, which is why it's in my ➕ column for using blocks rather than directives 😅

What's the incentive for nested blocks? Shouldn't we use div for that?

@rowanc1
Copy link
Copy Markdown
Member

rowanc1 commented Feb 27, 2025

Ah, yeah, for a text-only/markup notebook that is true. We don't disallow blocks inside of markdown cells in an ipynb though, so nesting is technically possible in the AST. This is also the case when we are pulling in imported files or content.

I don't think that a text-notebook actually puts in kind for the notebook content cells. Which I think is fine? I also think if you are overriding kind to be a landing-hero unit, I think that does make sense to be the override..?!

@agoose77
Copy link
Copy Markdown
Contributor Author

I feel as though notebook-content isn't that useful, so I'm OK with it being easy to override.

@rowanc1 rowanc1 force-pushed the agoose77/feat-landing-pages branch from d512d3e to 81f689d Compare March 5, 2025 17:18
@rowanc1 rowanc1 merged commit 0941552 into main Mar 5, 2025
@rowanc1 rowanc1 deleted the agoose77/feat-landing-pages branch March 5, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants