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
* Rfc/issue 115 build time data access (#269)
* graphql server working
* apollo client connect to apollo server
* connected header example using lit apollo
* todo
* todos
* query and client + server refactor
* schema refactoring
* clean up console logging
* alias all @greenwood/cli/data module imports
* avoid paramater destructuring
* graphql example in the header
* multiple schemas
* internal data sources documentation
* shelf refactor and children query integration
* refactor out ApolloQuery
* ability to intercept client.query calls
* basic semi-working implementation
* remove extra config from server context
* have puppeteer wait for graphql requests before returning content
* fix and add test cases for apollo
* merged resolvers not actually working
* multiple queries support
* everything working
* todos
* TODO tracking
* fix fallback apollo client fetch handling
* full test suite
* cache json test cases
* stablize test due to inconsistent data results ordering
* clean up deps
* todo cleanup
* remove forced client call in SSG mode for client
* represent graph through the schema
* updated data docs
* typos and grammer
* typos and community link fixes
* hello and graph queries working together
* config def and resolvers
* flesh out config schema and query
* remove theme file from config
* delete hello query example
* formatting
* documentation
* app template with config title from data
* tests for custom page title
* refactoring meta to app-template and data instead of scaffolding and added tests
* update coverage config
* fix spelling mistake
Copy file name to clipboardexpand all lines: www/pages/docs/layouts.md
-10
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,10 @@ Here is an example `page-template.js` (the [default](https://github.com/ProjectE
12
12
```render js
13
13
import { html, LitElement } from 'lit-element';
14
14
MDIMPORT;
15
-
METAIMPORT;
16
-
METADATA;
17
15
18
16
class PageTemplate extends LitElement {
19
17
render() {
20
18
return html\`
21
-
METAELEMENT
22
19
<div class='wrapper'>
23
20
<div class='page-template content'>
24
21
<entry></entry>
@@ -43,13 +40,6 @@ MDIMPORT;
43
40
`MDIMPORT;` Tells Greenwood to import a markdown file into this component. But we also have to define where the compiled markdown element(page) will be placed within our page-template. Hence below within our `render()` method you will see the `<entry></entry>` element. That defines exactly where to place it.
44
41
45
42
46
-
```render js
47
-
METAIMPORT;
48
-
METADATA;
49
-
```
50
-
51
-
`METAIMPORT;` and `METADATA;` hook variables import the default greenwood meta component and data which handles all your configured meta data. You can then render this component within the `render()` method using the `METAELEMENT` variable hook.
52
-
53
43
The complete example can be found in the [greenwood source](https://github.com/ProjectEvergreen/greenwood/blob/master/packages/cli/templates/page-template.js) which is the default page-template.js if no other is defined.
54
44
55
45
With a completed page-template.js present in your `src/templates/` folder you can define which page uses it via front-matter at the top of any markdown file. See [Front Matter Docs](/docs/front-matter#define-template) for more information. Simply including a file named `page-template.js` will overwrite the greenwood default template for all markdown files, without needing to declare the template at the top of markdown file.
> Don't worry too much about the capitalized expressions, this is discussed in more detail in our [docs](/docs/template/). Also, as seen here, Greenwood provides a version of [**LitElement**](https://lit-element.polymer-project.org/) by default that you can use for your own components if you would like.
61
+
> Don't worry too much about the capitalized expression, this is discussed in more detail in our [docs](/docs/template/). Also, as seen here, Greenwood provides a version of [**LitElement**](https://lit-element.polymer-project.org/) by default that you can use for your own components if you would like.
0 commit comments