public function buildMetaDataForPageIdentifier($identifier, $pageDataPath = null)
    {
        $configuration = ConfigurationManager::getConfiguration();
        $dataPath = $configuration->get('basePath') . $configuration->get('dataPath');
        $pageName = $this->getPageNameForPageIdentifier($identifier);
        $metaDataPath = $dataPath . $pageName . '.json';

        // Read the global configuration
        $metaData = ObjectUtility::valueForKeyPathOfObject("pages.$identifier.meta", $configuration, []);

        // Check if the node exists
        if (file_exists($metaDataPath)) {
            $rawMetaData = file_get_contents($metaDataPath);
            $metaData = array_merge($metaData, (array)json_decode($rawMetaData, true));
        }

        if ($pageDataPath && file_exists($pageDataPath)) {
            $metaData['date'] = date('c', filemtime($pageDataPath));
        }

        return $metaData;
    }