diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 9876b3e..e783923 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -1,23 +1,61 @@ import { defineConfig } from "vitepress"; -// https://vitepress.dev/reference/site-config export default defineConfig({ title: "Phlex", description: "Ruby views", themeConfig: { - // https://vitepress.dev/reference/default-theme-config nav: [ { text: "Home", link: "/" }, - { text: "Guide", link: "/guide/rails" }, + { text: "Community", link: "/community" }, + { text: "Guide", link: "/guide" }, ], - sidebar: [ { - text: "Guide", - items: [{ text: "Rails", link: "/guide/rails" }], + text: "Intro", + link: "guide", + }, + { + text: "Rails", + items: [ + { text: "Installation", link: "guide/rails/installation" }, + { text: "Views", link: "guide/rails/views" }, + { text: "Components" }, + { text: "Layouts" }, + { text: "Helpers" }, + { text: "Generators" }, + { text: "Migrating to Phlex" }, + ], + }, + { + text: "HTML", + items: [ + { text: "Introduction" }, + { text: "Elements" }, + { text: "Attributes" }, + { text: "Comments" }, + { text: "Helpers" }, + { text: "Whitespace" }, + ], + }, + { + text: "SVG", + items: [ + { text: "Introduction" }, + { text: "Elements" }, + { text: "Attributes" }, + ], + }, + { + text: "CSV", + items: [{ text: "Introduction" }, { text: "CSV Injection" }], }, ], - - socialLinks: [{ icon: "github", link: "https://github.com/phlex-ruby" }], + socialLinks: [ + { icon: "github", link: "https://github.com/phlex-ruby" }, + { icon: "discord", link: "https://discord.gg/p7C9SWS8Sa" }, + ], + footer: { + message: "Released under the MIT License.", + }, }, }); diff --git a/community.md b/community.md new file mode 100644 index 0000000..4ddbced --- /dev/null +++ b/community.md @@ -0,0 +1,6 @@ +# Community + +## GitHub Repositories + +- [Phlex](https://github.com/phlex-ruby/phlex) - The main repository for Phlex +- [Phlex Rails](https://github.com/phlex-ruby/phlex-rails) - The Rails engine for Phlex diff --git a/guide/index.md b/guide/index.md new file mode 100644 index 0000000..3cac478 --- /dev/null +++ b/guide/index.md @@ -0,0 +1,946 @@ +# Phlex 💪 + +Phlex is a [Ruby gem](https://rubygems.org/gems/phlex) for building fast object-oriented HTML and SVG components. Views are described using Ruby constructs: _methods_, _keyword arguments_ and _blocks_, which directly correspond to the output. For example, this is how you might describe an HTML `