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

It is not possible to include files from subdirectories #27

Open
drusin opened this issue Aug 31, 2017 · 1 comment
Open

It is not possible to include files from subdirectories #27

drusin opened this issue Aug 31, 2017 · 1 comment

Comments

@drusin
Copy link

drusin commented Aug 31, 2017

I want to include files that are not in the same folder that my main file is

::StoryIncludes
subpages/page1.tw2

I tried putting slashes and backslashes everywhere but did not manage to get it to work.

@purrloftruth
Copy link

Hi, @drusin:

I have managed to do this running twee2 0.5.0 on macOS 10.12.6. For some reason, the paths are relative to where you're running twee2 from, not to the source file. So say you have a project folder with a src folder inside it, and various subfolders inside that, but you're running twee2 from your project folder like so:

$ twee2 watch src/main.tw2 build/index.html

Your paths in the StoryIncludes need to be formatted relative to the project folder. e.g.:

::StoryIncludes
src/subpages/page1.tw2

I would consider this its own bug, honestly, and would love to hear comment from @Dan-Q on whether this was intentional or not. I feel that it would make more sense if the filepaths included in any given StoryIncludes passage were loaded relative to the file containing that particular passage.

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