I am currently writing my first plugin for Grav and was wondering, how to get the path to the .md file which is currently opened using php.
$this->grav['page'] to have access to the current Page object
Got get to the actual file, you can use:
How you get page depends on which event you are in. You can look in other plugins for examples.