vaderjs 1.3.3-alpha-147 → 1.3.3-alpha-148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -125,13 +125,37 @@ Vader compiles all code to a static index.html page so your visitors will never
125
125
  We can define some metadata to be used at compile
126
126
 
127
127
  ```jsx
128
+ // src/layout.tsx
129
+ export function Layout({title, keywords, description, children}){
130
+ return <>
131
+ <Html lang="en-us">
132
+ <Head>
133
+ <title>${title}</title>
134
+ <meta charset="utf-8" />
135
+ <meta name="description" content={description} />
136
+ <meta name="robots" content="index, follow" />
137
+ <meta name="author" content="Malik Whitten" />
138
+ <meta name="keywords" content={keywords} />
139
+ <meta name="url" content="https://malikwhitten.com" />
140
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
141
+ <link rel="icon" href={logo} />
142
+ <script src="/src/theme.js" eager> </script>
143
+ <link rel="stylesheet" href="/public/css/styles.css" />
144
+ </Head>
145
+
146
+ ${children}
147
+ </Html>
148
+ </>
149
+ }
128
150
 
129
- export const $metadata = {
130
- title: "Malik Whitten - Home",
131
- styles:['/public/css/styles.css'],
132
- description: "Malik Whitten's personal website",
133
- icon: "https://avatars.githubusercontent.com/u/123524260?s=200&v=4",
134
- tags:[`cutom tags to place in head`]
151
+ // pages/index.jsx
152
+
153
+ export default function (req, res){
154
+ return <>
155
+ <Layout {...{title:'home', description:'home page', keywords:'vader.js', logo:''}}>
156
+ <h1> Hello World</h1>
157
+ </Layout>
158
+ </>
135
159
  }
136
160
 
137
161
  ```
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "vaderjs",
3
3
  "description": "A Reactive library aimed to helping you build reactive applications inspired by react.js",
4
4
  "module": "vader.js",
5
- "version": "1.3.3-alpha-147",
5
+ "version": "1.3.3-alpha-148",
6
6
  "bin": {
7
7
  "vader": "./vader.js"
8
8
  },