Comments (5)
Ah shit, thanks! Should be fixed on master
now -- I'll publish a new version on PyPi tomorrow. Cheers!
from piecrust2.
if I did everything right ... I got this error now :
chef --debug publish test
[piecrust.main] Using cache key: default
[piecrust.app] Creating site configuration...
[piecrust.appconfig] Loading configuration from cache...
[piecrust.cache] Reading cache: /home/kevin/travail/Documents/mcgdb_website/_cache/c21f969b5f03d33d43e04f8f136e7682/app/config.json
[piecrust.commands.builtin.scaffolding] Skipping source 'theme_pages' because it's a theme source.
[piecrust.main] init() takes 3 positional arguments but 4 were given
Traceback (most recent call last):
File "/home/kevin/travail/tools/PieCrust2/piecrust/main.py", line 70, in main
exit_code = _run_chef(pre_args, argv)
File "/home/kevin/travail/tools/PieCrust2/piecrust/main.py", line 269, in _run_chef
c.setupParser(p, app)
File "/home/kevin/travail/tools/PieCrust2/piecrust/commands/builtin/publishing.py", line 30, in setupParser
for pub in app.publishers:
File "/usr/lib/python3.5/site-packages/werkzeug/utils.py", line 71, in get
value = self.func(obj)
File "/home/kevin/travail/tools/PieCrust2/piecrust/app.py", line 195, in publishers
tgt = cls(self, n, t)
TypeError: init() takes 3 positional arguments but 4 were given
(with last git commit)
from piecrust2.
another nit while I'm at it :)
diff --git a/foodtruck/scm/git.py b/foodtruck/scm/git.py
index 84350cb..871cc2e 100644
--- a/foodtruck/scm/git.py
+++ b/foodtruck/scm/git.py
@@ -31,7 +31,7 @@ class GitSourceControl(SourceControl):
else:
res.new_files.append(path)
elif line.startswith(' M '):
- res.edited_files.append(path[3:])
+ res.edited_files.append(line[3:])
print(res.__dict__)
return res
and by the way, I can't get the foodtruck to work (well), in particular the static pages are not accessible, in particular http://localhost:8090/static/css/foodtruck.min.css is 404, http://localhost:8090/static/img/foodtruck.png as well ... and I can't find where you hook to treat static content differently from dynamic pages ... !
from piecrust2.
still playing around, I share my 'fixes' for just information, the first part of the diff tell you where are the problems :
diff --git a/foodtruck/web.py b/foodtruck/web.py
index 22f7113..376e300 100644
--- a/foodtruck/web.py
+++ b/foodtruck/web.py
@@ -34,7 +34,8 @@ if (app.config.get('FOODTRUCK_CMDLINE_MODE', False) and
# Add a special route for the `.well-known` directory.
app.wsgi_app = SharedDataMiddleware(
app.wsgi_app,
- {'/.well-known': os.path.join(admin_root, '.well-known')})
+ {'/.well-known': os.path.join(admin_root, '.well-known'),
+ '/static': "/path/to/PieCrust2/foodtruck/assets"})
if os.path.isfile(config_path):
app.config.from_pyfile(config_path)
get https://github.com/twbs/bootstrap-sass and useruby scss to build foodtruck.css
diff --git a/foodtruck/views/create.py b/foodtruck/views/create.py
index 841d192..4adf46b 100644
--- a/foodtruck/views/create.py
+++ b/foodtruck/views/create.py
@@ -45,8 +45,7 @@ def write_page(source_name):
fp.write('')
flash("%s was created." % os.path.relpath(fac.path, site.root_dir))
- route = site.getRoute(source.name, fac.metadata,
- skip_taxonomies=True)
+ route = site.getSourceRoute(source.name, fac.metadata)
if route is None:
logger.error("Can't find route for page: %s" % fac.path)
abort(500)
and
diff --git a/foodtruck/views/dashboard.py b/foodtruck/views/dashboard.py
index e4f1b1c..1409323 100644
--- a/foodtruck/views/dashboard.py
+++ b/foodtruck/views/dashboard.py
@@ -79,8 +79,9 @@ def _getWipData(path, site, fs_endpoints):
return None
fac = source.buildPageFactory(os.path.join(site.root_dir, path))
- route = site.piecrust_app.getRoute(
- source.name, fac.metadata, skip_taxonomies=True)
+
+ route = site.piecrust_app.getSourceRoute(
+ source.name, fac.metadata)
if not route:
return None
--> naming problem?
from piecrust2.
Hey, sorry for the trouble... I didn't do a very good job with the test coverage on these parts of PieCrust :(
Anyway, first, I failed to document properly how to use FoodTruck with a source version of PieCrust. The problems you have with missing FoodTruck assets is that you have to run bower install
and gulp
(notice the Bower and Gulp files at the root of the PieCrust repo). This should make sure the FoodTruck assets are compiled into the static
directory (and therefore you shouldn't have to edit the SharedDataMiddleware
code).
Second, the Git support for FoodTruck is fairly experimental (I don't personally use Git), and I actually thought it wasn't included in the source! (i.e. I thought I kept it local). Oh well.
The other bugs should be fixed -- some I had fixes for already but it wasn't pushed yet (it is now). I'm refactoring things to make it possible to run automated tests on FoodTruck so it should get better. Sorry again!
from piecrust2.
Related Issues (20)
- Site/Root variable including tilde results in URI error upon baking HOT 2
- Assets not processed HOT 5
- How to handle pages with "more" link HOT 1
- Can't get children to work properly HOT 4
- Trying to run FoodTruck HOT 4
- pip install not working HOT 2
- "python2" and python3 compatiblity(at the same time) of Piecrust2 HOT 2
- Sass sourcemaps HOT 1
- Current entry already exists HOT 2
- site.root contains "/" even when set to "" HOT 3
- Add ability to just generate relative URLs HOT 5
- dashboard.html template not found HOT 2
- "chef init mywebsite" encounter error,how to fix it? HOT 3
- Include "wheel" in depenencies HOT 4
- Prebuild assets HOT 1
- PieCrust 3.2.1. appears to not make pages correctly HOT 1
- PieCrust admin doesn't work with Flask 1.0 HOT 1
- Unable to use Source functions in Jinja macros
- bake could not find pagination HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from piecrust2.