-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsonld templating playground #28
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1a788a0
start jsonld templating playground
C-Loftus a35b852
slightly bigger font size
C-Loftus 4654c41
first example working
C-Loftus d06cee4
Rerun test with no changes
C-Loftus db7ef06
try with new dependencies
C-Loftus e20b636
fix proper name
C-Loftus 560773b
make sidebar open by default
C-Loftus 3f7122b
toggle button working
C-Loftus c670af2
sparnatural working at a baseline
C-Loftus 1d18c73
remove sparnatural since it doesn't build
C-Loftus 66ad739
Merge branch 'main' into playground
C-Loftus 5155c6e
fix package lock
C-Loftus 714cceb
working
C-Loftus 84a4b08
push all working
C-Loftus 645c89d
added help info
C-Loftus 1c728a7
templating working
C-Loftus 0b5a296
add other files i forgot
C-Loftus ea2bfa0
get rid of a line that might be confusing.
C-Loftus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...erence/data-formats/jsonld/exploration.md → docs/playground/jsonld.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
|
||
title: "JSON-LD Playground" | ||
sidebar_position: 2 | ||
hide_title: true | ||
--- | ||
|
||
<iframe width="100%" height="1300px" src="https://tinyurl.com/29qaectm" title="JSON-LD playground"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: "Jinja templating" | ||
hide_title: true | ||
--- | ||
|
||
import Playground from '@site/src/components/Playground'; | ||
|
||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
<Tabs> | ||
<TabItem value="play" label="Playground" default> | ||
<Playground/> | ||
</TabItem> | ||
<TabItem value="help" label="Help and Background Info" > | ||
|
||
<!-- bigger but not ## because otherwise ## will show up in the heading when the tab isn't in focus --> | ||
<div style={{fontSize: "1.5em", fontWeight: "bold", margin: "1em 0 0.5em 0"}}> | ||
Templating Overview | ||
</div> | ||
|
||
This page allows you to explore templating JSON-LD with Jinja so that it is easier to [contribute and expose your data](/docs/contributing/overview.md) for Geoconnex. | ||
|
||
- The left editor contains raw JSON-LD output from pygeoapi. | ||
- The center editor contains the Jinja template that processes it. | ||
- The right editor shows the final templated output. | ||
|
||
<div style={{fontSize: "1.0em", fontWeight: "bold", margin: "1em 0 0.5em 0"}}> | ||
Notes on templating within pygeoapi | ||
</div> | ||
|
||
When pygeoapi applies a Jinja template, it considers the entire source JSON-LD to be the top-level key named `data`. Otherwise, the Jinja templating in pygeoapi is standard and follows expected patterns. | ||
|
||
:::note | ||
|
||
For info on getting pygeoapi running locally, see [step 2](/contributing/step-2/pygeoapi/deployment) of the contribution guide. | ||
|
||
::: | ||
|
||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct?