diff --git a/content/learn/book/_index.md b/content/learn/book/_index.md index 4c45df5d46..1906ee994e 100644 --- a/content/learn/book/_index.md +++ b/content/learn/book/_index.md @@ -1,8 +1,8 @@ +++ title = "Book" sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" redirect_to = "learn/book/introduction" insert_anchor_links = "right" +++ \ No newline at end of file diff --git a/content/learn/book/contributing/_index.md b/content/learn/book/contributing/_index.md index b676641501..9ed572335b 100644 --- a/content/learn/book/contributing/_index.md +++ b/content/learn/book/contributing/_index.md @@ -2,8 +2,8 @@ title = "Contributing" weight = 4 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" [extra] subtitle = "join the bevy" diff --git a/content/learn/book/contributing/code/_index.md b/content/learn/book/contributing/code/_index.md index 292bc9f878..8109b24e1c 100644 --- a/content/learn/book/contributing/code/_index.md +++ b/content/learn/book/contributing/code/_index.md @@ -2,8 +2,8 @@ title = "Code" weight = 1 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Contributing Code" diff --git a/content/learn/book/contributing/docs/_index.md b/content/learn/book/contributing/docs/_index.md index 5d457a9384..368f16c286 100644 --- a/content/learn/book/contributing/docs/_index.md +++ b/content/learn/book/contributing/docs/_index.md @@ -2,8 +2,8 @@ title = "Docs" weight = 2 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Contributing Docs" diff --git a/content/learn/book/faq/_index.md b/content/learn/book/faq/_index.md index 9a10a99254..d0d0fbc62a 100644 --- a/content/learn/book/faq/_index.md +++ b/content/learn/book/faq/_index.md @@ -1,9 +1,9 @@ +++ -title = "Faq" +title = "FAQ" weight = 6 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Frequently Asked Questions" diff --git a/content/learn/book/getting-started/_index.md b/content/learn/book/getting-started/_index.md index e530f6ff44..af3997dd15 100644 --- a/content/learn/book/getting-started/_index.md +++ b/content/learn/book/getting-started/_index.md @@ -2,8 +2,8 @@ title = "Getting Started" weight = 2 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/content/learn/book/getting-started/apps/_index.md b/content/learn/book/getting-started/apps/_index.md index ce81cf7ce3..cfe5d59321 100644 --- a/content/learn/book/getting-started/apps/_index.md +++ b/content/learn/book/getting-started/apps/_index.md @@ -2,8 +2,8 @@ title = "Apps" weight = 2 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/content/learn/book/getting-started/ecs/_index.md b/content/learn/book/getting-started/ecs/_index.md index 93c8404091..aa42d700fa 100644 --- a/content/learn/book/getting-started/ecs/_index.md +++ b/content/learn/book/getting-started/ecs/_index.md @@ -2,8 +2,8 @@ title = "ECS" weight = 3 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/content/learn/book/getting-started/plugins/_index.md b/content/learn/book/getting-started/plugins/_index.md index 46376c2468..ee4d44423a 100644 --- a/content/learn/book/getting-started/plugins/_index.md +++ b/content/learn/book/getting-started/plugins/_index.md @@ -2,8 +2,8 @@ title = "Plugins" weight = 4 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/content/learn/book/getting-started/resources/_index.md b/content/learn/book/getting-started/resources/_index.md index 794b5969c5..36a3035e62 100644 --- a/content/learn/book/getting-started/resources/_index.md +++ b/content/learn/book/getting-started/resources/_index.md @@ -2,8 +2,8 @@ title = "Resources" weight = 5 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/content/learn/book/getting-started/setup/_index.md b/content/learn/book/getting-started/setup/_index.md index 4a61e75268..37cae8f3a3 100644 --- a/content/learn/book/getting-started/setup/_index.md +++ b/content/learn/book/getting-started/setup/_index.md @@ -2,8 +2,8 @@ title = "Setup" weight = 1 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/content/learn/book/introduction/_index.md b/content/learn/book/introduction/_index.md index 72c757d847..836907f464 100644 --- a/content/learn/book/introduction/_index.md +++ b/content/learn/book/introduction/_index.md @@ -2,15 +2,15 @@ title = "Introduction" weight = 1 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ If you came here because you wanted to learn how to make 2D / 3D games, visualizations, user interfaces, or other graphical applications with Bevy ... you came to the right place! If not, stick around anyway. I promise it will be fun.

- What's a BEVY? + What's a BEVY?

A bevy is a group of birds! diff --git a/content/learn/book/next-steps/_index.md b/content/learn/book/next-steps/_index.md index 1cc08bde49..3e3efe7d88 100644 --- a/content/learn/book/next-steps/_index.md +++ b/content/learn/book/next-steps/_index.md @@ -2,8 +2,8 @@ title = "Next Steps" weight = 3 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/content/learn/book/troubleshooting/_index.md b/content/learn/book/troubleshooting/_index.md index d1b75c3903..4d562ecf61 100644 --- a/content/learn/book/troubleshooting/_index.md +++ b/content/learn/book/troubleshooting/_index.md @@ -2,8 +2,8 @@ title = "Troubleshooting" weight = 5 sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/content/learn/book/migration-guides/0.4-0.5/_index.md b/content/learn/migration-guides/0.4-0.5/_index.md similarity index 98% rename from content/learn/book/migration-guides/0.4-0.5/_index.md rename to content/learn/migration-guides/0.4-0.5/_index.md index 7fc340c423..912c30a196 100644 --- a/content/learn/book/migration-guides/0.4-0.5/_index.md +++ b/content/learn/migration-guides/0.4-0.5/_index.md @@ -1,9 +1,7 @@ +++ title = "0.4 to 0.5" -weight = 1 -sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +weight = 7 +template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Migration Guide: 0.4 to 0.5" diff --git a/content/learn/book/migration-guides/0.5-0.6/_index.md b/content/learn/migration-guides/0.5-0.6/_index.md similarity index 99% rename from content/learn/book/migration-guides/0.5-0.6/_index.md rename to content/learn/migration-guides/0.5-0.6/_index.md index 08b17a8179..abc5d4fc76 100644 --- a/content/learn/book/migration-guides/0.5-0.6/_index.md +++ b/content/learn/migration-guides/0.5-0.6/_index.md @@ -1,9 +1,7 @@ +++ title = "0.5 to 0.6" -weight = 2 -sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +weight = 6 +template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Migration Guide: 0.5 to 0.6" diff --git a/content/learn/book/migration-guides/0.6-0.7/_index.md b/content/learn/migration-guides/0.6-0.7/_index.md similarity index 98% rename from content/learn/book/migration-guides/0.6-0.7/_index.md rename to content/learn/migration-guides/0.6-0.7/_index.md index 64608089f3..3302ea5361 100644 --- a/content/learn/book/migration-guides/0.6-0.7/_index.md +++ b/content/learn/migration-guides/0.6-0.7/_index.md @@ -1,9 +1,7 @@ +++ title = "0.6 to 0.7" -weight = 3 -sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +weight = 5 +template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Migration Guide: 0.6 to 0.7" diff --git a/content/learn/book/migration-guides/0.7-0.8/_index.md b/content/learn/migration-guides/0.7-0.8/_index.md similarity index 99% rename from content/learn/book/migration-guides/0.7-0.8/_index.md rename to content/learn/migration-guides/0.7-0.8/_index.md index d7a63c94fe..a6488d7a9d 100644 --- a/content/learn/book/migration-guides/0.7-0.8/_index.md +++ b/content/learn/migration-guides/0.7-0.8/_index.md @@ -1,9 +1,7 @@ +++ title = "0.7 to 0.8" weight = 4 -sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Migration Guide: 0.7 to 0.8" diff --git a/content/learn/book/migration-guides/0.8-0.9/_index.md b/content/learn/migration-guides/0.8-0.9/_index.md similarity index 97% rename from content/learn/book/migration-guides/0.8-0.9/_index.md rename to content/learn/migration-guides/0.8-0.9/_index.md index 5fbdba8980..b91d13eccd 100644 --- a/content/learn/book/migration-guides/0.8-0.9/_index.md +++ b/content/learn/migration-guides/0.8-0.9/_index.md @@ -1,9 +1,7 @@ +++ title = "0.8 to 0.9" -weight = 5 -sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +weight = 3 +template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Migration Guide: 0.8 to 0.9" diff --git a/content/learn/book/migration-guides/0.9-0.10/_index.md b/content/learn/migration-guides/0.9-0.10/_index.md similarity index 97% rename from content/learn/book/migration-guides/0.9-0.10/_index.md rename to content/learn/migration-guides/0.9-0.10/_index.md index a8141d67df..6992bdc1d1 100644 --- a/content/learn/book/migration-guides/0.9-0.10/_index.md +++ b/content/learn/migration-guides/0.9-0.10/_index.md @@ -1,9 +1,7 @@ +++ title = "0.9 to 0.10" -weight = 6 -sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +weight = 2 +template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Migration Guide: 0.9 to 0.10" diff --git a/content/learn/migration-guides/_index.md b/content/learn/migration-guides/_index.md new file mode 100644 index 0000000000..ef6e87f7cc --- /dev/null +++ b/content/learn/migration-guides/_index.md @@ -0,0 +1,7 @@ ++++ +title = "Migration Guides" +sort_by = "weight" +page_template = "docs-section.html" +redirect_to = "learn/migration-guides/introduction" +insert_anchor_links = "right" ++++ \ No newline at end of file diff --git a/content/learn/book/migration-guides/_index.md b/content/learn/migration-guides/introduction/_index.md similarity index 68% rename from content/learn/book/migration-guides/_index.md rename to content/learn/migration-guides/introduction/_index.md index f91bcc4be1..0d3be0b2c9 100644 --- a/content/learn/book/migration-guides/_index.md +++ b/content/learn/migration-guides/introduction/_index.md @@ -1,9 +1,7 @@ +++ -title = "Migration Guides" -weight = 7 -sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +title = "Introduction" +weight = 1 +template = "docs-section.html" insert_anchor_links = "right" +++ diff --git a/generate-release/src/migration_guide.rs b/generate-release/src/migration_guide.rs index cd4c1740f0..e68e8281c8 100644 --- a/generate-release/src/migration_guide.rs +++ b/generate-release/src/migration_guide.rs @@ -22,8 +22,8 @@ pub fn generate_migration_guide( title = "{title}" weight = {weight} sort_by = "weight" -template = "book-section.html" -page_template = "book-section.html" +template = "docs-section.html" +page_template = "docs-section.html" insert_anchor_links = "right" [extra] long_title = "Migration Guide: {title}" diff --git a/sass/components/_book-footer.scss b/sass/components/_docs-footer.scss similarity index 86% rename from sass/components/_book-footer.scss rename to sass/components/_docs-footer.scss index c0bb2856a6..fe79caf22e 100644 --- a/sass/components/_book-footer.scss +++ b/sass/components/_docs-footer.scss @@ -1,18 +1,18 @@ -.book-footer { +.docs-footer { $border-color: #2f3033; - --book-footer-gap: 12px; + --docs-footer-gap: 12px; margin: 32px 0; @media #{$bp-tablet-portrait-up} { - --book-footer-gap: 20px; + --docs-footer-gap: 20px; } &__nav { display: grid; - gap: var(--book-footer-gap); - padding: var(--book-footer-gap) 0; + gap: var(--docs-footer-gap); + padding: var(--docs-footer-gap) 0; grid-template-columns: 1fr; grid-template-areas: 'next' @@ -39,7 +39,7 @@ background-color: rgba($color-white, 0.01); color: $color-white; - .book-footer__dir { + .docs-footer__dir { color: #999; } } @@ -49,7 +49,7 @@ flex-direction: row-reverse; padding-left: 16px; - .book-footer__label { + .docs-footer__label { padding: 0 8px 0 12px; } } @@ -59,7 +59,7 @@ text-align: right; padding-right: 16px; - .book-footer__label { + .docs-footer__label { padding: 0 12px 0 8px; } } @@ -87,7 +87,7 @@ &__edit-wrapper { border-top: 2px solid $border-color; text-align: center; - padding-top: var(--book-footer-gap); + padding-top: var(--docs-footer-gap); } &__edit { diff --git a/sass/pages/_book.scss b/sass/pages/_docs.scss similarity index 89% rename from sass/pages/_book.scss rename to sass/pages/_docs.scss index 24669e9bf8..14cfaf4ffc 100644 --- a/sass/pages/_book.scss +++ b/sass/pages/_docs.scss @@ -1,10 +1,10 @@ -.book-page { +.docs-page { display: flex; width: 100%; min-height: 500px; } -.book-page-subtitle { +.docs-page-subtitle { font-size: 1.3rem; font-weight: 800; color: #999999; @@ -12,7 +12,7 @@ vertical-align: middle; } -.book-content { +.docs-content { position: relative; width: 100%; min-width: 0; @@ -39,7 +39,7 @@ } -.book-whats-a-bevy { +.docs-whats-a-bevy { background-color: #00000000 !important; height: 2.4rem !important; border-radius: unset !important; diff --git a/sass/site.scss b/sass/site.scss index 2e41e083b9..377aa78baa 100644 --- a/sass/site.scss +++ b/sass/site.scss @@ -22,7 +22,7 @@ // - Components can be composed between them to create new components // - These should be self contained and shouldn't affect other styling @import "components/bevy-instance"; -@import "components/book-footer"; +@import "components/docs-footer"; @import "components/button-square"; @import "components/button"; @import "components/card"; @@ -47,7 +47,7 @@ @import "pages/community"; @import "pages/people"; @import "pages/assets"; -@import "pages/book"; +@import "pages/docs"; @import "pages/news"; @import "pages/features"; @import "pages/content"; diff --git a/static/assets/migration-guides.svg b/static/assets/migration-guides.svg new file mode 100644 index 0000000000..7538e7d526 --- /dev/null +++ b/static/assets/migration-guides.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + diff --git a/static/optional-helpers.js b/static/optional-helpers.js index 3ed75b0913..b39b0a2a25 100644 --- a/static/optional-helpers.js +++ b/static/optional-helpers.js @@ -1,15 +1,15 @@ // these helpers should be totally optional. if someone disables this javascript in their browser, // core functionality should not be affected. -function navigateBookNext(e) { +function navigateDocsNext(e) { if (e.key == 'ArrowLeft') { - var previous = document.querySelector("[data-book-nav-previous]"); + var previous = document.querySelector("[data-docs-nav-previous]"); if (previous) { previous.click(); } } else if (e.key == 'ArrowRight') { - var next = document.querySelector("[data-book-nav-next]"); + var next = document.querySelector("[data-docs-nav-next]"); if (next) { next.click(); } @@ -17,5 +17,5 @@ function navigateBookNext(e) { } window.addEventListener('load', function () { - window.addEventListener('keydown', navigateBookNext); + window.addEventListener('keydown', navigateDocsNext); }); diff --git a/templates/book.html b/templates/book.html deleted file mode 100644 index 6ae8cc17a8..0000000000 --- a/templates/book.html +++ /dev/null @@ -1 +0,0 @@ -{% extends "layouts/base.html" %} diff --git a/templates/book-section.html b/templates/docs-section.html similarity index 60% rename from templates/book-section.html rename to templates/docs-section.html index 42c0d8f7e0..72bcdee308 100644 --- a/templates/book-section.html +++ b/templates/docs-section.html @@ -1,25 +1,34 @@ {% extends "layouts/page-with-menu.html" %} -{% import "macros/book.html" as book_macros %} +{% import "macros/docs.html" as docs_macros %} {% block head_extensions %} {% endblock %} -{% block page_name %}Book{% endblock %} +{% block page_name %} + {% if section and section.path is starting_with("/learn/book/") %} + The Book + {% else %} + Migration Guides + {% endif %} +{% endblock %} {% block mobile_page_menu %} - {{book_macros::book_menu(prefix="mobile-menu", root=get_section(path="learn/book/_index.md"))}} + {% set root_section_path = section.components | slice(end=2) | concat(with="_index.md") | join(sep="/") %} + {{docs_macros::docs_menu(prefix="mobile-menu", root=get_section(path=root_section_path))}} {% endblock %} {% block page_menu %} - {{book_macros::book_menu(prefix="page-menu", root=get_section(path="learn/book/_index.md"))}} + {% set root_section_path = section.components | slice(end=2) | concat(with="/_index.md") | join(sep="/") %} + {{docs_macros::docs_menu(prefix="page-menu", root=get_section(path=root_section_path))}} {% endblock %} {% block page_content %} -
-
+
+
{# Create an array of sections, in reading order #} - {% set root_section = get_section(path="learn/book/_index.md") %} + {% set root_section_path = section.components | slice(end=2) | concat(with="/_index.md") | join(sep="/") %} + {% set root_section = get_section(path=root_section_path) %} {% set all_sections = [] %} {% for p in root_section.subsections %} @@ -64,33 +73,33 @@

{{ section.title }} {% endif %} {% if section.extra.subtitle %} - ({{section.extra.subtitle}}) + ({{section.extra.subtitle}}) {% endif %}

{{ section.content | safe }}
-