diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 3f990ae..c568825 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -7,7 +7,7 @@ export default defineConfig({ nav: [ { text: "Home", link: "/" }, { text: "Community", link: "project/community" }, - { text: "Guide", link: "/guide" }, + { text: "Handbook", link: "/handbook" }, ], sidebar: [ { @@ -18,22 +18,35 @@ export default defineConfig({ { text: "GitHub", link: "https://github.com/phlex-ruby" }, ], }, + { - text: "Guide", + text: "Handbook", + link: "/handbook/", collapsed: false, items: [ - { text: "Intro", link: "/guide/" }, - { text: "Setup", link: "/guide/setup" }, - { text: "Your first component", link: "/guide/first-component" }, - { text: "Under the hood", link: "/guide/under-the-hood" }, - { text: "Attributes deep-dive", link: "/guide/attributes" }, - { text: "Advanced components", link: "/guide/advanced-components" }, - { text: "Tags", link: "/guide/tags" }, - { text: "Layouts", link: "/guide/layouts" }, + { text: "Intro", link: "/handbook/" }, + { text: "Setup", link: "/handbook/setup" }, + { text: "Your first component", link: "/handbook/first-component" }, + { text: "Under the hood", link: "/handbook/under-the-hood" }, + { text: "Attributes deep-dive", link: "/handbook/attributes" }, + { + text: "Advanced components", + link: "/handbook/advanced-components", + }, + { text: "Tags", link: "/handbook/tags" }, + { text: "Layouts", link: "/handbook/layouts" }, ], }, + + { + text: "Guides", + collapsed: false, + items: [{ text: "Upgrading to v2", link: "/guides/v2-upgrade" }], + }, + { text: "Reference", + link: "/reference/", collapsed: false, items: [ { text: "SGML", link: "/reference/sgml" }, @@ -51,16 +64,17 @@ export default defineConfig({ }, ], }, + { text: "Technical Design", - collapsed: false, + collapsed: true, items: [ { text: "Intro", link: "/design/intro" }, { text: "Caching", link: "/design/caching" }, { text: "Performance", link: "/design/performance" }, - { text: "Component Kits" }, - { text: "Rails Integration" }, - { text: "Selective Rendering" }, + { text: "Component kits" }, + { text: "Rails integration" }, + { text: "Selective rendering" }, { text: "Deferred Render" }, ], }, diff --git a/design/index.md b/design/index.md new file mode 100644 index 0000000..cb59dc2 --- /dev/null +++ b/design/index.md @@ -0,0 +1,3 @@ +# Technical Design + +This is a space to go into a little more detail about the technical design of some of the more interesting parts of Phlex. This is worth reading if you’re interested in understanding how Phlex works and maybe considering contributing to the project. diff --git a/design/intro.md b/design/intro.md deleted file mode 100644 index 47fb48f..0000000 --- a/design/intro.md +++ /dev/null @@ -1,3 +0,0 @@ -# Technical Design - -This is a space to go into a little more detail about the technical design of some parts of Phlex. This is worth reading if you’re interested in understanding how Phlex works and maybe considering contributing to the project. diff --git a/guides/v2-upgrade.md b/guides/v2-upgrade.md new file mode 100644 index 0000000..837c2cf --- /dev/null +++ b/guides/v2-upgrade.md @@ -0,0 +1,33 @@ +# Upgrading to v2 + +While we’ve tried to keep breaking changes to a minimum, there are a few things you will need to be aware of when upgrading from Phlex v1 to v2. + +The latest version of v1 contains a number of deprecations, so we recommend upgrading to the latest version of v1 first. + +## Breaking changes + +### `template` → `view_template` + +Instead of defining the `template` method for your component templates, you should instead define `view_template`. + +### `template_tag` → `template` + +To render [`