You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/content-as-data/collections.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ tocHeading: 2
6
6
7
7
# Collections
8
8
9
-
Collections are a feature in Greenwood by which you can use [frontmatter](/docs/resources/markdown/#frontmatter) to group pages that can then be referenced through [JavaScript](/docs/content-as-data/data-client/) or [active frontmatter](/docs/content-as-data/active-frontmatter/).
9
+
Collections are a feature in Greenwood by which you can use [frontmatter](/docs/resources/markdown/#frontmatter) to group pages that can then be referenced through [JavaScript](/docs/content-as-data/data-client/) or [active frontmatter](/docs/content-as-data/active-frontmatter/). This can be a useful way to group pages for things like navigation menus based on the content in your pages directory.
10
10
11
-
This can be a useful way to group pages for things like navigation menus based on the content in your pages directory.
11
+
See our [reference docs on Greenwood's available types](/docs/reference/appendix/#types)for more information on authoring with TypeScript.
Copy file name to clipboardExpand all lines: src/pages/docs/content-as-data/data-client.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@ tocHeading: 2
6
6
7
7
# Data Client
8
8
9
-
To access your content as data with Greenwood, there are three pre-made APIs you can use, based on your use case. These are isomorphic in that they will consume live data during development, and statically build out each query at build time to its own JSON file that will be fetched client side without needing a. This way, you can serialize and / or hydrate from this data as needed based on your needs.
9
+
To access your content as data with Greenwood, there are three pre-made APIs you can use, based on your use case. These are isomorphic in that they will consume live data during development, and statically build out each query at build time to its own JSON file that will be fetched client side without needing a server. This way, you can serialize and / or hydrate from this data as needed based on your needs.
10
+
11
+
See our [reference docs on Greenwood's available types](/docs/reference/appendix/#types) for more information on authoring with TypeScript.
10
12
11
13
> This feature works best when used for build time templating when combined with the [**static** optimization](/docs/reference/configuration/#optimization) setting.
Copy file name to clipboardExpand all lines: src/pages/docs/plugins/css-modules.md
+44-1Lines changed: 44 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: CSS Modules
3
3
label: CSS Modules
4
4
layout: docs
5
-
order: 3
5
+
order: 2
6
6
tocHeading: 2
7
7
---
8
8
@@ -123,3 +123,46 @@ And reference that in your (Light DOM) HTML based Web Component:
123
123
<!-- prettier-ignore-end -->
124
124
125
125
From there, Greenwood will scope your CSS class names by prefixing them with the filename and a hash of the contents, inline that into a `<style>` tag in the HTML, and then strip the reference to the _module.css_ file from your JavaScript file.
126
+
127
+
## Types
128
+
129
+
Types should automatically be inferred through this package's exports map, but can be referenced explicitly in both JavaScript (JSDoc) and TypeScript files if needed.
|[Babel](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-babel)| Use [**Babel**](https://babeljs.io/) plugins, presets, and configuration in your project. |
30
29
|[HTML Include](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-include-html)| Inspired by the original [HTML Imports spec](https://www.html5rocks.com/en/tutorials/webcomponents/imports/). |
31
30
|[Import Raw](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-import-raw)| Enables usage of ESM syntax for loading arbitrary file contents as a string. |
@@ -34,6 +33,5 @@ Below is the official list of supported first-party plugins available by the Gre
34
33
|[Netlify](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-adapter-netlify)| Deploy serverless and edge functions to [**Netlify**](https://www.netlify.com/). |
35
34
|[Polyfills](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-polyfills)| Web Component related polyfills for older browsers. |
36
35
|[PostCSS](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-postcss)| Allows usage of [**PostCSS**](https://postcss.org/) plugins and configuration in your project. |
37
-
|[Puppeteer](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-renderer-puppeteer)| A rendering plugin to support prerendering a Greenwood project using Puppeteer. |
38
-
|[TypeScript](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-typescript)| Allows usage of [**TypeScript**](https://www.typescriptlang.org/) syntax. |
36
+
|[Puppeteer](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-renderer-puppeteer)| A rendering plugin to support prerendering a Greenwood project using Puppeteer. ||
39
37
|[Vercel](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-adapter-vercel)| Deploy serverless and edge functions with [**Vercel**](https://vercel.com/). |
Copy file name to clipboardExpand all lines: src/pages/docs/plugins/lit-ssr.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Lit SSR
3
3
label: Lit SSR
4
4
layout: docs
5
-
order: 2
5
+
order: 1
6
6
tocHeading: 2
7
7
---
8
8
@@ -123,3 +123,33 @@ Below is an example of generating a page of LitElement based Web Components:
123
123
<!-- prettier-ignore-end -->
124
124
125
125
> Keep in mind you will need to make sure your Lit Web Components are isomorphic and [properly leveraging `LitElement`'s lifecycles](https://github.com/lit/lit/tree/main/packages/labs/ssr#notes-and-limitations) and browser / Node APIs accordingly for maximum compatibility and portability.
126
+
127
+
## Types
128
+
129
+
Types should automatically be inferred through this package's exports map, but can be referenced explicitly in both JavaScript (JSDoc) and TypeScript files if needed.
> If you're using Lit with TypeScript, you'll most likely be using [their decorators](https://lit.dev/docs/components/decorators/#compiler-output-considerations), If so, make sure to enable the [`useTsc` option](/docs/reference/configuration/#use-typescript-compiler) in your Greenwood configuration file.
Copy file name to clipboardExpand all lines: src/pages/docs/plugins/postcss.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: PostCSS
3
3
label: PostCSS
4
4
layout: docs
5
-
order: 5
5
+
order: 4
6
6
tocHeading: 2
7
7
---
8
8
@@ -118,3 +118,31 @@ and see the results of the plugin in the generated styles
118
118
}
119
119
}
120
120
```
121
+
122
+
## Types
123
+
124
+
Types should automatically be inferred through this package's exports map, but can be referenced explicitly in both JavaScript (JSDoc) and TypeScript files if needed.
Copy file name to clipboardExpand all lines: src/pages/docs/plugins/raw.md
+44-1Lines changed: 44 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
layout: docs
3
-
order: 4
3
+
order: 3
4
4
tocHeading: 2
5
5
---
6
6
@@ -111,3 +111,46 @@ Or perfect for statically embedding SVGs into HTML:
111
111
</app-ctc-block>
112
112
113
113
<!-- prettier-ignore-end -->
114
+
115
+
## Types
116
+
117
+
Types should automatically be inferred through this package's exports map, but can be referenced explicitly in both JavaScript (JSDoc) and TypeScript files if needed.
0 commit comments