deester4x4jr / grav-plugin-import Goto Github PK
View Code? Open in Web Editor NEWUsed to allow importing of yaml files into grav pages
License: MIT License
Used to allow importing of yaml files into grav pages
License: MIT License
I know you said we have to implement ourselves, but I have a problem.
{{ dump(page.header.import) }}
works fine and tells me I have a nested array with three top-level elements. But absolutely everything I have tried to access the first element has failed.
{{ dump(page.header.import[0]) }}
gives null
I tried to get back to basics.
{% set myvar = ['foo','bar','crap'] %}
{% set newvar = ( myvar|slice(0, 1)) %}
Works exactly as expected. But {% set newvar = ( page.header.import|slice(0, 1)) %}
results in a blank, not null, when I {{ dump(newvar) }}
I really want to be able to access that array that is the top element, but I just cannot see how. Any help gratefully received.
I think I am missing something in how to implement this.
I have added a file named ex_config.json to the folder for a page.
For the docs.md file in that folder I have added imports: ex_config.json
to the frontmatter and then used {{ page.header.imports.ex_config.json }}
in the main body of the markdown.
This is not working and the page only renders {{ page.header.imports.ex_config.json }}
hey @Deester4x4jr, a request for Fork has been submitted to our Repo: getgrav/grav#1191
This basically asks for the GPM version to be pointed to the forked version. Are you continuing to maintain and support this plugin?
Cheers!
If we import a single file that is entered as:
imports: file.yaml
the plugin injects the data extracted directly into the imports
object. If we import an array of files as:
imports:
- file1.yaml
- file2.yaml
the plugin will inject each file's data into corresponding named arrays under the imports
object. This is inconsistent and we should be using the latter as the preferred method, to make it easier to consistently recall the data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.