ralla / grav-plugin-dotenv Goto Github PK
View Code? Open in Web Editor NEWDotEnv support for Grav.
License: MIT License
DotEnv support for Grav.
License: MIT License
When saving via admin plugin the environment variable is saved back to the config on disk. This is not preferred, if there is an existing environment variable set. It could be filtered via OnAdminSave
event.
While Grav now has methods for handling configuration outside of the core configuration, there is sometimes still a need for using a completely stand-alone .env
file. I think this is a useful plugin, and I would like to see this plugin continue. If you don't have the time or inclination to do it, I would like to fork and maintain it. I would like to do this under the getgrav
organization so it becomes an official Grav plugin. Please let me know ASAP if you would rather continuing to maintain it.
Cheers!
Andy
Hi,
Consider using the Symfony component instead: https://github.com/symfony/symfony/tree/4.4/src/Symfony/Component/Dotenv
Like this we can have various .gravenv, ie: .gravenv, .gravenv.local, .gravenv.dev, etc.
Kind regards,
For example site.test=false
is parsed as false
string. Checking with an if inside twig returns true.
The phpdotenv package is a few versions behind the latest release of 4.1.6. I'm happy to submit a pull request that updates to the latest version.
What do you think? Alright if I go ahead with this?
Hi,
I attempted to clone this repo to my plugins folder, but on a new page load, I receive the following error:
Class 'Dotenv\Dotenv' not found
at line
\user\plugins\dotenv\dotenv.php:34
Am I missing steps for installing this?
Downloaded the 1.0.1 linked above and installed it. Created a .gravenv file with the suggested changes. No errors thrown now but the .gravenv settings (e.g., system.debugger.enabled=true) are having no effect. Also, the 1.0.1 CHANGELOG.md shows v1.0.0.
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.