grow / grow Goto Github PK
View Code? Open in Web Editor NEWA declarative website generator designed for high-quality websites, with a focus on easy maintenance and localization.
Home Page: https://grow.dev
License: MIT License
A declarative website generator designed for high-quality websites, with a focus on easy maintenance and localization.
Home Page: https://grow.dev
License: MIT License
I find that the [sourcecode]
extension always leaves a stray <br />
tag. The markup I see in Firebug:
<div class="code">
<div class="highlight" ...>
...
</div>
<br>
</div>
I'm not quite sure what corner-case the line-ending substitution is intending to catch, but everything seems to look fine if I just remove it:
--- a/grow/common/markdown_extensions.py
+++ b/grow/common/markdown_extensions.py
@@ -114,7 +114,6 @@ class CodeBlockPreprocessor(preprocessors.Preprocessor):
except ValueError:
lexer = lexers.TextLexer()
code = highlight(m.group(2), lexer, self.formatter)
- code = code.replace('\n\n', '\n \n').replace('\n', '<br />')
return '\n\n<div class="code">%s</div>\n\n' % code
joined_lines = "\n".join(lines)
joined_lines = self.pattern.sub(repl, joined_lines)
If the translation compiler is moved to a preprocessor, it will benefit from the ability to recompile translations on change.
I've used Gulp.js on a few projects recently and find it to be an amazingly intuitive way of setting up a build workflow. Just throwing a suggestion out there to integrate it into the 'grow build' command.
Traceback:
$ grow run
Traceback (most recent call last):
File "<string>", line 37, in <module>
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 610, in __call__
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 590, in main
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 936, in invoke
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 782, in invoke
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 416, in invoke
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.commands.run", line 30, in run
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.server.manager", line 49, in start
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.pods.preprocessors.file_watchers", line 123, in create_dev_server_observers
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.pods.preprocessors.file_watchers", line 78, in schedule_preprocessors
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.pods.preprocessors.file_watchers", line 87, in _schedule_preprocessor
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/watchdog.observers.fsevents", line 172, in schedule
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/watchdog.observers.api", line 329, in schedule
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/watchdog.observers.fsevents", line 73, in __init__
File "/Users/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/watchdog.utils.dirsnapshot", line 246, in __init__
OSError: [Errno 2] No such file or directory: '/Users/jeremydw/repo/bower_components/.tmp'
jeremydw@jeremydw-macbookair:~/repo/$ mkdir -p
grow deploy currently deploys .DS_Store files. Would be nice to have a way to ignore files, as well as adding some default files. Similar to .gitignore.
Traceback:
stevenle@sl-ubuntu:~/src/stevenle.github.io$ grow run _grow
The Grow SDK is experimental. Expect backwards incompatibility until v0.1.0.
Thank you for testing and contributing! Visit http://growsdk.org for resources.
Traceback (most recent call last):
File "<string>", line 34, in <module>
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.appcommands", line 796, in Run
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.app", line 238, in run
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.app", line 267, in _actual_start
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.appcommands", line 793, in InterceptReallyStart
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.app", line 220, in really_start
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.appcommands", line 778, in _CommandsStart
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.appcommands", line 284, in CommandRun
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.commands", line 186, in Run
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.server.manager", line 53, in start
AttributeError: 'module' object has no attribute 'create_dev_server_observer'
Pre-processors would enable integration with the following kinds of utilities:
Currently, only fields and templates can be translated.
Now that the project has made an "experimental" release, it's time to remove dead code and organize a few things to make it easier for contributors.
When deployed for the first time, Grow SDK on App Engine needs to create a GCS bucket when using GCS for storage. Currently, it assumes the bucket already exists and dies when trying to write files to a non-existent bucket.
Users should be able to kick off preprocessors or run commands like machine_translate
through a web-based admin console. Particularly useful for Google Sheets integration to manually trigger a redownload without restarting the dev server.
We currently watch translations for changes and automatically recompile them, but the user still needs to manually reload the server. We need to evict the gettext cache and reload the development server (if necessary) so that recompiled translations are immediately available.
We should allow developers to provide free-form comments for translators as well as specify character limits for strings in UI templates. These comments and character limits should be extracted from templates and inserted into PO files as extracted comments (https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html).
Reported by Jens:
Lines like
out_dir: @foo-launch/
make my Grow explode.
Could we permit “@” in directory names? ^_^
(Please. :)
Apparently sessions are a new thing in pip?
Just installed pip fresh on an OS X Yosemite system, got pip 6.0.8, did pip install grow
, got:
Collecting grow
Downloading grow-0.0.40.tar.gz (6.1MB)
100% |################################| 6.1MB 42kB/s
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/var/folders/tp/tx8xhwrs4j969bmjjs_qww200000gn/T/pip-build-kguB0D/grow/setup.py", line 21, in <module>
install_requires=[str(ir.req) for ir in _install_requirements],
File "/Users/vitorio/Library/Python/2.7/lib/python/site-packages/pip-6.0.8-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/var/folders/tp/tx8xhwrs4j969bmjjs_qww200000gn/T/pip-build-kguB0D/grow/setup.py", line 21, in <module>
install_requires=[str(ir.req) for ir in _install_requirements],
File "/Users/vitorio/Library/Python/2.7/lib/python/site-packages/pip-6.0.8-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/tp/tx8xhwrs4j969bmjjs_qww200000gn/T/pip-build-kguB0D/grow
I think this is an example of another project with the same problem, and their fix: jmcarp/robobrowser@89027e7
This is currently unimplemented.
This will prevent people from launching sites with images that are not optimized. Since image processing is often not implemented in pure Python, we should have a close look at file size and platform compatibility implications when adding this preprocessor.
The documentation says:
Content documents can be associated with URLs and with views (so they represent pages in your site), or not. Content documents without URLs are simply used internally, and can be referenced by other content documents.
and
If path is omitted, content in this collection will not be generated into pages. If path is specified, view is a required field.
Which I interpret to mean, if I do not define paths, by having an empty _blueprint.yaml
file in my collection directory, then the filename.html
HTML snippet content in it (which also has no YAML front matter) will not have paths generated for it, but will be able to be referenced by other content by specifying a document path as a variable and referencing it in my template like this:
{% set fbpixel = g.doc(doc.fbpixel) %}
{{fbpixel.html|safe}}
However, this does not appear to be the case. An empty _blueprint.yaml
, with no path
or view
specified, still causes the documents to try to be processed in collectionz.py
list_documents()
process()
. Providing YAML front matter to define $hidden: true
also does not help, as it continues onto the locale handling code.
It seems the minimum amount of YAML for this to work as expected is a _blueprint.yaml
with only:
path:
And also the same in the front matter for my HTML snippet. Only having one or the other does not seem to work: only in the front matter and there's a locale issue; only in the blueprint and there's a path naming issue.
(Also, when debugging this, the routing table seems to not clear itself properly; I kept having to kill and re-run grow run
to triage this.)
So:
(I expected an empty _blueprint.yaml
and needing no front matter to work.)
Currently, grow_version is a required field in podspec.yaml
however we don't enforce this requirement. We should:
podspec.yaml
(see documentation),We currently don't have any centralized location where we validate a pod and its configuration files, so perhaps this would be a good candidate to start that work. Perhaps in a new file pygrow/grow/pods/validation.py
.
If the pod fails to validate when the server is started (or when attempting a build/deploy), an error should be shown to the user invoking the command informing them what the issue is and how to fix it.
Tracebacks displayed by the grow
binary currently show the build system's path. Example below. The issue actually has to do with PyInstaller and the code freezing process. There is apparently a workaround that we can look into (see links below), but it seems no one is actively working on this issue on the PyInstaller side.
stevenle@sl-ubuntu:~/src/stevenle.github.io$ grow run _grow
Traceback (most recent call last):
File "<string>", line 34, in <module>
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.appcommands", line 796, in Run
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.app", line 238, in run
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.app", line 267, in _actual_start
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.appcommands", line 793, in InterceptReallyStart
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.app", line 220, in really_start
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.appcommands", line 778, in _CommandsStart
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/google_apputils.appcommands", line 284, in CommandRun
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.commands", line 186, in Run
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.server.manager", line 53, in start
AttributeError: 'module' object has no attribute 'create_dev_server_observer'
hi.
git clone https://github.com/grow/pygrow grow
cd grow
as3:/grow# ls/grow# pip install -r requirements.txt
AUTHORS grow LICENSE run_service_tests.sh
bin grow.spec MANIFEST.in run_tests.py
build_release.sh install README.md setup.py
description.txt install.py requirements.txt upload_release.sh
as3:
as3:/grow#/grow# python install.py install
as3:
Welcome to the installer for Grow SDK v0.0.30
==> This script will install: /root/bin/grow
==> An alias for "grow" will be created in: /root/.bash_profile
Continue? [y/N]: y
Downloading from https://github.com/grow/pygrow/releases/download/0.0.30/Grow-SDK-
Linux-0.0.30.zip
.................. done!
[✓] Installed Grow SDK to: /root/bin/grow
[✓] Created "grow" alias in: /root/.bash_profile
All done! Now type "grow" and press enter to use the Grow SDK.
as3:/grow# grow/grow# /root/bin/grow
-bash: /root/bin/grow: cannot execute binary file
as3:
-bash: /root/bin/grow: cannot execute binary file
as3:~/grow#
how to fix it?
tks
To make URL changes easier, add the ability for content documents and collections to specify a list of alternate URLs (paths) that redirect to the canonical URL for the content.
Example of a URL change:
#1: /content/pages/_blueprint.yaml
path: /foo/{slug}/
#2: /content/pages/_blueprint.yaml
path: /site/foo/{slug}/
redirects:
- path: /foo/{slug}/
For a page whose slug is "bar", when (2) is deployed, requests to /foo/bar/ will be redirected to /site/foo/bar/. When site owners decide the redirects are no longer necessary, they can be easily removed from the blueprint without hunting down the origin/reason behind the URL change/redirect.
We should make it possible to interactively supply GCS/S3 credentials (just like Google's oauth2client) during deployment if they're not already available in the environment via a .boto file.
Traceback:
$ grow machine_translate --locale=es .
[13:11:50] Updating translation template: /translations/messages.pot
[13:11:50] Extracting from: /views/base.html
[13:11:50] Extracting from: /content/pages/index.html
[13:11:50] Extracting from collection: /content/pages
Traceback (most recent call last):
File "/usr/local/bin/grow", line 5, in <module>
pkg_resources.run_script('grow==0.0.39', 'grow')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 492, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1350, in run_script
execfile(script_filename, namespace, namespace)
File "/Library/Python/2.7/site-packages/grow-0.0.39-py2.7.egg/EGG-INFO/scripts/grow", line 37, in <module>
grow()
File "/Library/Python/2.7/site-packages/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/Library/Python/2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Python/2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/Library/Python/2.7/site-packages/grow-0.0.39-py2.7.egg/grow/commands/machine_translate.py", line 15, in machine_translate
pod.catalogs.extract()
File "/Library/Python/2.7/site-packages/grow-0.0.39-py2.7.egg/grow/pods/catalogs/catalog_holder.py", line 137, in extract
utils.walk(doc.tagged_fields, lambda *args: callback(doc, *args))
File "/Library/Python/2.7/site-packages/grow-0.0.39-py2.7.egg/grow/common/utils.py", line 61, in walk
callback(item, key, node)
File "/Library/Python/2.7/site-packages/grow-0.0.39-py2.7.egg/grow/pods/catalogs/catalog_holder.py", line 137, in <lambda>
utils.walk(doc.tagged_fields, lambda *args: callback(doc, *args))
File "/Library/Python/2.7/site-packages/grow-0.0.39-py2.7.egg/grow/pods/catalogs/catalog_holder.py", line 123, in callback
_handle_field(doc.pod_path, item, key, unused_node)
File "/Library/Python/2.7/site-packages/grow-0.0.39-py2.7.egg/grow/pods/catalogs/catalog_holder.py", line 130, in _handle_field
item, None, [(path, 0)], auto_comments=comments, context=context)
NameError: free variable 'context' referenced before assignment in enclosing scope
LOC:
https://github.com/grow/pygrow/blob/develop/grow/pods/catalogs/catalog_holder.py#L130
When trying to authenticate with ssh-agent keys, I get an authentication error. It is a non-specific error and I believe it to be a mismatch between dev username and target username:
~ whoami
dennis
~ ssh-add -l
2048 20:5c:dd:a9:0f:df:aa:45:d1:93:a0:bc:1b:43:ac:df /Users/dennis/.ssh/id_rsa (RSA)
~ grow deploy web1 mojado.com
Deploying to: mojado.com:/home/dmojado/www/
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Connected (version 2.0, client OpenSSH_6.0p1)
Authentication (publickey) failed.
Traceback (most recent call last):
File "<string>", line 27, in <module>
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.appcommands", line 796, in Run
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.app", line 238, in run
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.app", line 267, in _actual_start
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.appcommands", line 793, in InterceptReallyStart
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.app", line 220, in really_start
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.appcommands", line 778, in _CommandsStart
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.appcommands", line 284, in CommandRun
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/grow.commands", line 96, in Run
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/grow.deployments.base", line 130, in deploy
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/grow.deployments.scp", line 24, in prelaunch
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/paramiko.client", line 273, in connect
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/paramiko.client", line 456, in _auth
paramiko.ssh_exception.AuthenticationException: Authentication failed.
I tried to debug as it is happening in scp.py:
python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko, os
>>> paramiko.common.logging.basicConfig(level=paramiko.common.DEBUG)
>>> ssh = paramiko.SSHClient()
>>> ssh.load_system_host_keys()
>>> ssh.connect("www.mojado.com", port=22)
DEBUG:paramiko.transport:starting thread (client mode): 0xa592610L
INFO:paramiko.transport:Connected (version 2.0, client OpenSSH_6.0p1)
DEBUG:paramiko.transport:kex algos:['ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '[email protected]'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '[email protected]'] client mac:['hmac-md5', 'hmac-sha1', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-256-96', 'hmac-sha2-512', 'hmac-sha2-512-96', 'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-256-96', 'hmac-sha2-512', 'hmac-sha2-512-96', 'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', '[email protected]'] server compress:['none', '[email protected]'] client lang:[''] server lang:[''] kex follows?False
DEBUG:paramiko.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
DEBUG:paramiko.transport:using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
DEBUG:paramiko.transport:Switch to new keys ...
DEBUG:paramiko.transport:Trying SSH agent key 205cdda90fdfaa45da9fa0bd1843acdf
DEBUG:paramiko.transport:userauth is OK
INFO:paramiko.transport:Authentication (publickey) failed.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.8-intel/egg/paramiko/client.py", line 337, in connect
File "build/bdist.macosx-10.8-intel/egg/paramiko/client.py", line 528, in _auth
paramiko.AuthenticationException: Authentication failed.
>>> DEBUG:paramiko.transport:EOF in transport thread
When I have ssh key in ssh-agent and test with parameter "username", e.g.
>>> ssh.connect("www.mojado.com", username="dmojado" port=22)
the connection seems to work.
I propose we add an optional username parameter to destination: scp in podspec.yaml to allow for discrepancies between dev username and production server login.
Should be able to load YAML files into context variables. Usage is:
{% set foo = g.yaml('/data/foo.yaml') %}
Sample syntax:
preprocessors:
- kind: google_spreadsheets
path: /data/file.csv
id: 1winHap7dPK1dWu46DqPK1-bwkKJQv6ljDMrDz6HepGE
gid: 12345
Exports the Google spreadsheet by id and gid to pod path /data/file.csv
As a convenience, consider incrementing the port automatically, for those of us too lazy to use the --port flag. :)
Grow ideally useful for SPA. It should be good idea to add coffeescript support to grow sdk as one of built-in preprocessors (like SASS support, for example).
Something like:
https://github.com/postcss/autoprefixer (maintained, but in JavaScript)
https://github.com/myfreeweb/cssprefixer/ (in Python, but GitHub description says "deprecated")
Move some of the business logic from existing subclasses of BaseDeployment to the parent class. This should make it easier to add new deployments by simply implementing a few methods which are specific to the deployments.
Methods are:
Currently, we default to <filename>.min.css
. This should be an overridable option.
Steps to reproduce:
Expected behavior: Grow should recover and operate normally once YAML syntax is fixed.
I'm doing:
grow init codelab _grow
grow run _grow
And when I navigate to localhost:8080, I get error The resource could not be found.
.
SDK version: 0.0.31
Would be great to be able to write custom preprocessor in python, or jinja extensions, without having to fork the repo. If there was some way to tell grow to add plugins dynamically, would make it much more customizable.
This may not be an error - I could just be missing something. When I run growsdk or codelab, all the links within the pages and sub-pages are fine. It appears that somehow within the server, all static items are always available at "/static/" regardless of path. When I generate the sites,however, with either build or deploy, the directory structure is not reflected in the links.
In codelab, for example, the static directory is referenced throughout in this way:
href="/static/css/main.min.css"
But for the generated static site, what's really needed is the following.
At the root:
href="static/css/main.min.css"
From the pages:
href="../static/css/main.min.css"
And from the posts:
href="../../static/css/main.min.css"
Is this something that's supposed to be addressed through configuration? Or from manipulating the url from within the view?
A related problem seems to crop up if you set the root path. If you do so, you have to (logically) change where the static directory is served from in order to cause the build to place the static directory within the new root path directory. (404 page winds up outside, too, FWIW.) But changing where the static directory is served from does not change the generated links to:
href="/newrootpath/static/css/main.min.css"
They remain:
href="/static/css/main.min.css"
Again, this could be my ignorance. I'm still trying to figure it all out. But it is surprising in that the build & deploy results do not match those of the results of the built-in server.
According to the grow documentation, $hidden: true
should prevent documents from appearing in g.docs(). The include_hidden
variable doesn't seem to be used in the list_documents
method.
https://github.com/grow/pygrow/blob/master/grow/pods/collectionz/collectionz.py#L145
Discussion at https://groups.google.com/forum/#!topic/growsdk/Rz2GtpCzGYw
We need to add support for configuring a few of Sass's options. We should allow the user to configure all options that it makes sense to allow them to configure, but prohibit them from configuring things that we should have an opinion about (such as some caching stuff, filesystem-related stuff, some of the system-related stuff, etc.).
For Sass, Grow SDK currently uses a Python binding of libsass (https://github.com/hcatlin/libsass), libsass-python (http://dahlia.kr/libsass-python/).
I'm loving the overall idea of GrowSDK and having fun exploring it. But I have run into the following glitch on Linux with 0.0.44.
When running, for example:
grow machine_translate --locale=ja ./my-codelab/
I get the following result:
[08:59:11] Updating translation template: /translations/messages.pot
[08:59:11] Extracting from: /views/index.html
[08:59:11] Extracting from: /views/base.html
[08:59:11] Extracting from: /views/posts.html
[08:59:11] Extracting from: /views/team.html
[08:59:11] Extracting from: /views/pages.html
[08:59:11] Extracting from: /views/archive.html
[08:59:11] Extracting from: /views/errors/default.html
[08:59:11] Extracting from collection: /content/pages
[08:59:11] Extracting from collection: /content/posts
[08:59:11] Extracting from podspec: /podspec.yaml
[08:59:11] Writing 33 messages to translation template.
Traceback (most recent call last):
File "<string>", line 43, in <module>
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 610, in __call__
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 590, in main
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 936, in invoke
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 782, in invoke
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/click.core", line 416, in invoke
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.commands.machine_translate", line 19, in machine_translate
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/grow.pods.catalogs.catalogs", line 192, in machine_translate
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/goslate", line 166, in _execute
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/goslate", line 363, in <lambda>
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/goslate", line 283, in _translate_single_text
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/goslate", line 166, in _execute
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/goslate", line 281, in <lambda>
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/goslate", line 206, in _basic_translate
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/goslate", line 144, in _open_url
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 410, in open
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 523, in http_response
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 442, in error
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 382, in _call_chain
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 629, in http_error_302
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 410, in open
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 523, in http_response
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 448, in error
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 382, in _call_chain
File "/home/jeremydw/git/pygrow/build/grow/out00-PYZ.pyz/urllib2", line 531, in http_error_default
urllib2.HTTPError: HTTP Error 400: Bad Request
Allow a definition for a simple SSH shell connection to deploy a build.
Right now the version number is stored in two places: install.py
and grow/VERSION
. We need to consolidate this to one place.
In addition to creating one canonical place to store the version, the update checker (in grow/common/sdk_utils.py
) should consult the latest released version of Grow, not the VERSION
file that's checked into the repo, in order to determine what the latest SDK version is.
Lastly, we need an automated way to upload a release to GitHub. Probably this means updating upload_release.sh
to use the GitHub API for releases. Right now upload_release.sh
simply uploads the PyPi release.
As part of the deployment process, we should have a way to visually preview the pages that are about to be launched. This should include the ability to see all pages, compare pages across locales, show "desktop vs. mobile", and also (eventually) compare staging to live.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.