Skip to content
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

A Fatal break the build when I config my theme #121

Open
DongyunLee opened this issue Aug 17, 2020 · 1 comment
Open

A Fatal break the build when I config my theme #121

DongyunLee opened this issue Aug 17, 2020 · 1 comment

Comments

@DongyunLee
Copy link

Env

OS: macOS 10.15.6

php:

PHP 7.3.11 (cli) (built: Jul  5 2020 03:23:39) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies

Some Code

#!/usr/bin/env php

<?php

require 'vendor/autoload.php';

use Doctrine\RST\Builder;
use Doctrine\RST\Configuration;
use Doctrine\RST\Formats\Format;
use Doctrine\RST\Kernel;

defined('ROOT') || define('ROOT', dirname(__DIR__));

$source = ROOT . '/docs/rst';
$target = ROOT . '/runtime/docs';

$configuration = new Configuration();
$configuration->setFileExtension(Format::HTML);
$configuration->setIndentHTML(true);
$configuration->setCustomTemplateDirs(
    [
        ROOT . '/docs/themes',
    ]
);
$configuration->setTheme('nim');

$kernel = new Kernel($configuration);

$builder = new Builder($kernel);
$builder->setIndexName('quick_start');

$builder->build($source, $target);

File Struction

  • docs/
    • rst/
      • Some RST file
      • ……
    • themes/
      • nim/
        • xxx.css
        • html/
          • layout.html.twig

Error Info

Fatal error: Uncaught Twig\Error\LoaderError: The "/path/to/vendor/doctrine/rst-parser/lib/Templates/nim/html" directory does not exist ("/path/to/vendor/doctrine/rst-parser/lib/Templates/nim/html"). in /path/to/vendor/twig/twig/src/Loader/FilesystemLoader.php:106

Expect

I don't think it should be break when I have been specify the themes' dir.
Maybe there should be some thing make it pass as long as one of custumized dir and other per-build path.


Thanks for any helps!

@weaverryan
Copy link
Collaborator

It's very possible this was fixed by #114, but that's missing from the 0.2 branch. See #133.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants