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.
- package/README.md +30 -6
- 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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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