feat(docs): add why page
This commit is contained in:
parent
519573916c
commit
379addc4be
3 changed files with 26 additions and 14 deletions
|
@ -17,6 +17,7 @@ export default defineConfig({
|
|||
items: [
|
||||
// Each item here is one entry in the navigation menu.
|
||||
{ label: 'Getting Started', slug: 'guides' },
|
||||
{ label: 'Why?', slug: 'why' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
12
docs/src/content/docs/guides/why.md
Normal file
12
docs/src/content/docs/guides/why.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: Why use this base class?
|
||||
slug: 'why'
|
||||
---
|
||||
|
||||
Often times, when simple websites need a quick custom element, the best way is still to create one extending from `HTMLElement`. However, it can quickly reach a point where writing the code from scratch can seem confusing and hard to maintain especially when compared to other projects with more advanced setups.
|
||||
|
||||
Also, when coming from frameworks with an easy declarative coding experience (using templates), the default imperative way (e.g., creating instances of elements, manually attaching event handlers, and other DOM manipulations) is a frequent pain point we see.
|
||||
|
||||
This project aims to address these with virtually zero tooling required and thin abstractions from vanilla custom element APIs – giving you only the bare minimum code to be productive.
|
||||
|
||||
It works on current-day browsers without needing compilers, transpilers, or polyfills.
|
|
@ -7,30 +7,29 @@ hero:
|
|||
# image:
|
||||
# file: ../../assets/houston.webp
|
||||
actions:
|
||||
- text: Example Guide
|
||||
link: /guides/example/
|
||||
- text: Get Started
|
||||
link: /guides/
|
||||
icon: right-arrow
|
||||
- text: Read the Starlight docs
|
||||
link: https://starlight.astro.build
|
||||
- text: Play on CodePen
|
||||
link: https://codepen.io/ayoayco-the-styleful/pen/PoVegBK?editors=1010
|
||||
icon: external
|
||||
variant: minimal
|
||||
---
|
||||
|
||||
import { Card, CardGrid } from '@astrojs/starlight/components';
|
||||
|
||||
## Next steps
|
||||
|
||||
<CardGrid stagger>
|
||||
<Card title="Update content" icon="pencil">
|
||||
Edit `src/content/docs/index.mdx` to see this page change.
|
||||
<Card title="Reactive." icon="rocket">
|
||||
A robust API for synchronizing your component's UI and properties
|
||||
</Card>
|
||||
<Card title="Add new content" icon="add-document">
|
||||
Add Markdown or MDX files to `src/content/docs` to create new pages.
|
||||
<Card title="Tiny." icon="add-document">
|
||||
~1 kB base class (minified, compressed) with versatile utilities
|
||||
</Card>
|
||||
<Card title="Configure your site" icon="setting">
|
||||
Edit your `sidebar` and other config in `astro.config.mjs`.
|
||||
<Card title="Easy" icon="heart">
|
||||
Sensible life-cycle hooks that you understand and remember
|
||||
</Card>
|
||||
<Card title="Read the docs" icon="open-book">
|
||||
Learn more in [the Starlight Docs](https://starlight.astro.build/).
|
||||
<Card title="Familiar" icon="open-book">
|
||||
Use the built-in JSX-like syntax or bring your own custom templating
|
||||
</Card>
|
||||
</CardGrid>
|
||||
|
||||
|
|
Loading…
Reference in a new issue