From d7b1f41ca54b1fb803375d386a5fd4b95acd3416 Mon Sep 17 00:00:00 2001 From: Joel Drapper Date: Wed, 4 Sep 2024 14:19:48 +0100 Subject: [PATCH] Loads more changes to docs --- .vitepress/config.mts | 42 +++++++++----- design/index.md | 3 + design/intro.md | 3 - guides/v2-upgrade.md | 33 +++++++++++ {guide => handbook}/advanced-components.md | 0 {guide => handbook}/attributes.md | 0 {guide => handbook}/first-component.md | 0 {guide => handbook}/index.md | 0 {guide => handbook}/layouts.md | 0 {guide => handbook}/rails/views.md | 0 {guide => handbook}/setup.md | 0 {guide => handbook}/tags.md | 0 {guide => handbook}/under-the-hood.md | 0 index.md | 7 ++- reference/html.md | 24 +++++++- reference/index.md | 1 + reference/sgml.md | 66 +++++++++++++++++++++- reference/svg.md | 6 +- 18 files changed, 163 insertions(+), 22 deletions(-) create mode 100644 design/index.md delete mode 100644 design/intro.md create mode 100644 guides/v2-upgrade.md rename {guide => handbook}/advanced-components.md (100%) rename {guide => handbook}/attributes.md (100%) rename {guide => handbook}/first-component.md (100%) rename {guide => handbook}/index.md (100%) rename {guide => handbook}/layouts.md (100%) rename {guide => handbook}/rails/views.md (100%) rename {guide => handbook}/setup.md (100%) rename {guide => handbook}/tags.md (100%) rename {guide => handbook}/under-the-hood.md (100%) create mode 100644 reference/index.md 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 [`