Git Product home page Git Product logo

grow.dev's Introduction

Grow.dev

PyPi GitHub Actions Downloads Code Coverage

Grow is a declarative tool for rapidly building, launching, and maintaining high-quality static HTML.

  • Easy installation
  • Jinja template engine
  • Content managed in YAML and JSON files
  • Data-binding between content and templates
  • Configuration-based site architecture
  • Easy URL changes
  • Flexible internationalization and translation
  • Integration with external CMSes
  • Integration with Google Sheets
  • Fast builds

Quick start

One time only: install Pipenv and libyaml.

# On Mac with Homebrew (https://brew.sh/).
brew install pipenv libyaml

# On Ubuntu.
sudo apt install -y pipenv libyaml-dev

# On other distributions.
sudo apt install python-pip; pip install pipenv

Next: install and run Grow using a starter.

git clone https://github.com/grow/starter
cd starter
pipenv install
pipenv run grow install
pipenv run grow run

Documentation

Visit https://grow.dev to read the documentation.

grow.dev's People

Contributors

adelaidemt avatar anonymousandrew avatar crystalonscript avatar darari avatar denmojo avatar dependabot[bot] avatar fotinakis avatar galoget avatar gerardorn avatar j9t avatar jasonsemko avatar jbruwer avatar jeremydw avatar lgiordani avatar mhchen avatar nicbuitr avatar photong avatar stevenle avatar tushuhei avatar vitorio avatar zoramite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grow.dev's Issues

Add --noconfirm option to deployment docs

I imagine that someone who is pretty new in using an OSS project would not come to check the source code and I think the option of force deployment is easier than writing a .growrc.yaml file.

Add Python3 upgrading guide

We should provide a guide to help folks update projects to Python 3. Reply to this issue with other snags that users may hit when upgrading.

  • Updating extensions

  • Updating templates

    • iteritems -> items
    • Can't compare "string" to "None", so use selectattr or rejectattr on lists that might contain null values for comparison properties - '<' not supported between instances of 'str' and 'NoneType'
  • Updating Node versions

  • Use pipenv for Grow version management

0.6.5 grow. DocumentDoesNotExistError locale vs pod_path

I have upgraded to 0.6.5 and got DocumentDoesNotExistError. I have 2 lang site. So my ru version content is in /content/posts/ru/[email protected] and en version in /content/posts/en/[email protected] and almost all is ok before. Sorry but I don't remember my previous version.

Anyway I do grow run on 0.6.5 and get DocumentDoesNotExistError: Referenced document does not exist: path to file. File exists. So I go to pods.py line 565 and add print locale and pod_path and see that locale = ru but pod_path is a path to en file. I # if not doc.exists condition at all and build works fine.

To reproduce you can use my repo https://github.com/ViktorZharina/static-blog-based-on-grow

Thanks

Discussion - guides (solutions / walkthroughs / etc.) and blog

I'd like to create a place on our documentation site where we can provide guides in addition to our reference documentation. These guides would include content that tells a narrated story โ€“ some thoughts on sample content include:

  • How to host assets in Google Cloud Storage and use an extension for image transformation
  • How to produce a multilingual blog site
  • Each step required to build a static Grow site, integrate with CI, and launch on App Engine or Firebase
  • Managing workflows with stakeholders (e.g. staging, live, LQA)

In addition to guides like this, I'd also like our site to have a place where we can show off great examples of open source Grow sites (such as ampproject.org). All this content would also serve to help people discover Grow through organic searches and learn about its features.

Open question: do we lump all this into a blog with post categories, or do we to separate it out into some new guides? section in the documentation site?

Maybe we do the following:

  • Create a blog (I like DigitalOcean's blog) for narrative announcement content and website highlights
  • Expand the current "Workflow" section of the documentation to "Guides" and place "evergreen" guide content there

image

Thoughts? @Zoramite @uxder @adelaidemt @stevenle

Ugly error when doing a 'grow build'

$ grow build
Building: 33/33 (in 0:00:00)
Traceback (most recent call last):
File "", line 55, in
File "growsdk/click.core", line 664, in call
File "growsdk/click.core", line 644, in main
File "growsdk/click.core", line 991, in invoke
File "growsdk/click.core", line 837, in invoke
File "growsdk/click.core", line 464, in invoke
File "growsdk/grow.commands.build", line 29, in build
File "growsdk/grow.deployments.destinations.base", line 229, in deploy
File "growsdk/grow.deployments.indexes.indexes", line 249, in add_repo
File "growsdk/git.config", line 53, in assure_data_present
File "growsdk/ConfigParser", line 340, in get
ConfigParser.NoOptionError: No option 'name' in section: 'user'

Document translator comments

prop@: Text to translate
prop@#: Comment for translator
{#: Comment for translator #}
<h1>{{_('Text to translate')}}</h1>

etc

Using Service Workers (PWA) with Grow

Hi, I have been using the Grow framework for a few weeks now and have been really impressed. One thing I am struggling with is converting the site to a PWA.

The issue I have is that because I am using the fingerprint functionality for my CSS, JS and Images, (which generates fingerprinted file names) I am then unable to target these files from within JS files (service-worker.js). I need to be able to pass to the JS file what the fingerprint and root path will be.

One idea I had was to create a global JS object and pass the variables to the service-worker.js file

e.g. within base.html

let APP = {}
APP.fingerprint = {{env.fingerprint}}
APP.root = {{podspec.root}}

The problem I have is that the env.fingerprint variable does not seem to match fingerprint on the built files.

How can I assign the correct fingerprint variables so I can set the correct paths for the files in the service-worker.js file?

e.g.

const installFilesEssential = [
root + 'static/js/main-' + fingerprint + '.min.js',
root + 'static/css/main-' + fingerprint + '.css',
]

Does this technique seem ok, or is there a better way?

Debugging - Show error on page or terminal or log

When i'm doing something wrong, grow.io show me one blank page and don't give me any information about the error. How can i debug to know what am i doing wrong?

This console message don't tell me where is the error in my code:

WSGI application error
Traceback (most recent call last):
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/twisted/python/threadpool.py", line 262, in
inContext.theWork = lambda: context.call(ctx, func, _args, *_kw)
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, _args, *_kw)
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/twisted/python/context.py", line 83, in callWithContext
self.contexts.pop()
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/twisted/web/wsgi.py", line 521, in run
self.started = True
--- ---
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/twisted/web/wsgi.py", line 496, in run
appIterator = self.application(self.environ, self.startResponse)
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/werkzeug/wsgi.py", line 579, in call
return self.app(environ, start_response)
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/grow/server/main.py", line 97, in call
return self.wsgi_app(environ, start_response)
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/grow/server/main.py", line 93, in wsgi_app
response = self.dispatch_request(request)
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/grow/server/main.py", line 89, in dispatch_request
return self.handle_exception(request, e)
File "/Users/joseluizcoe/myapp/lib/python2.7/site-packages/grow/server/main.py", line 101, in handle_exception
if isinstance(exc, webob.exc.HTTPException):
exceptions.AttributeError: 'module' object has no attribute 'exc'

How can i debug my code?

Ubuntu 16.04. Segmentation fault (core dumped)

curl https://install.growsdk.org | bash
grow -> Segmentation fault (core dumped)

gdb grow
(gdb) run
Starting program: /home/devel/bin/grow

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106 ../sysdeps/x86_64/strlen.S: No such file or directory

lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

Document translation loading behavior

It may be hard to understand how translations are loaded from PO files, especially when PO files exist in folders with overlapping identifiers such as da and da_DK. While Grow does nothing special in this circumstance, for users unfamiliar with PO it may be nice to have explicit documentation on how this works.

Trying to run cloned grow.io on windows but having some error.

Hi,

After running grow install, and grow run, I accessed localhost:8080 and assuming to see the grow.io site. But got this error:

404: /
Traceback (most recent call last):
File "C:\python27\lib\site-packages\grow\server\main.py", line 28, in call
return self.wsgi_app(environ, start_response)
File "C:\python27\lib\site-packages\grow\server\main.py", line 70, in wsgi_app
response = self.dispatch_request(request)
File "C:\python27\lib\site-packages\grow\server\main.py", line 55, in dispatch_request
raise errors.RouteNotFoundError(text.format(path))
RouteNotFoundError: '/ was not found in routes.'

I am using a Windows machine. What to do in order to fix this simple error?

Internal links are broken

Going through the documentation I've notices that many (all?) of the internal links in the documentation are broken. I've seen a few under the "Reference" section, for example:

You get the point. All the links seam to be missing the "reference" part and are thus broken. Would love to help fix it, but not sure how to.

Code style guide and microsite production handbook

We should have a code and project style guide that recommends a best practice for building a standard website with Grow. The idea is that new developers can reference this style guide, we can share this style guide with major users of Grow, and we can include a link to this style guide in the README of Grow projects.

An idea is that whenever you jump into a Grow project you will feel "at home" with respect to the project structure.

@uxder - can you pick up the style guide from where I left off and add in anything I haven't written yet? The initial work I started is here in this branch - https://github.com/grow/grow.io/tree/styleguide

In addition to the style guide, we should also eventually have a "microsite production handbook" that details the project lifecycle from a high level. The handbook should include a brief overview of all the steps of a typical marketing project (discovery, kickoff, build, review, LQA, review, launch, repeat + maintain, etc.) as well as conventions around branch naming strategies, staging, etc.

The handbook can also include tools and recommendations that we may use for projects - e.g. svgo for SVG minification, airkit, GCS for asset hosting, and a theoretical image upload tool that we can build to upload images to Google's image hosting service (https://cloud.google.com/appengine/docs/standard/python/images/#get-serving-url) which can resize and crop images dynamically based on query params.

With these two things - the styleguide and microsite production handbook - we can empower Grow users as well as our team with a canonical resource for understanding the project lifecycle from both a tech and process standpoint.

/cc @adelaidemt, @Zoramite, @stevenle as FYI

Electron App

for all the "non"-shell guys. An Electron App would be a perfect aternative, woldn`t it?

Using amp-mustache for, returns an error

{{#items}}<div>{{id}}</div>{{/items}}

TemplateSyntaxError: unexpected char u'#' at...
500: / - Error building <Rendered(view='/views/base.html', doc='/content/pages/home.yaml', locale='en')>: unexpected char u'#'

Document nested collections

Currently there are no details on the docs about nested collections, but they exist and we should explain them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.