-
Notifications
You must be signed in to change notification settings - Fork 15
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
Trying to generate a site using the given assets directory leads to "'project' is undefined error" #1858
Comments
Looking at the traceback this is a problem with a Jinja2 template file in a static assets directory that accesses a non-existent Any such uncaught exceptions are a problem with the code, and never the user's fault, so thank you for reporting this :) |
You may have noticed the traceback does not tell us which file specifically caused this problem. Instead, it just says |
Now that #1862 is merged, would you be comfortable installing Betty from source (instructions) and checking if Betty now shows a traceback with a |
I didn't change any of the files in the
Does this mean that the command line version of betty has access to these templates without having to copy them over to the directory you run the I can try installing from source later this week! |
You will never have to copy existing assets, period. Does your project use Cotton Candy (the default theme) or a custom theme? Without a theme extension you will see very bare pages indeed. |
It wasn't using a theme extension. Everything is working as expected with the extension added, thanks! |
Excellent! I had already made a note some time ago to show a warning when no theme is enabled but not got around to it. There are valid reasons not to have a theme (testing, it's way faster not to use a theme if you're testing something that does not depend on front-end code) but the lack of any sort of warning should not make this the frustration experience you've had. |
I opened #1867 to add a warning, although this will (initially) be for the upcoming Betty 0.4 version only. |
This might be a user error and not a betty issue, so I apologize in advance if I misunderstood how the generate command works.
In order to create a site using the same templates as the demo site, I copied the
betty/assets
directory within this repo to the same directory as mybetty.yaml
file and ranbetty -c betty.yaml generate
. This caused the following error (I've removed the full path to most of these files):I got the same error when I tried to generate a static site using
betty gui
instead, and in both instances I did not modify any of the files in theassets
directory. Let me know if I'm missing something, or if there is another issue at play here!The text was updated successfully, but these errors were encountered: