-
Notifications
You must be signed in to change notification settings - Fork 694
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
🎉 Update grow to v1.0.0 #5292
🎉 Update grow to v1.0.0 #5292
Changes from 4 commits
98b7489
9b80e67
15d2e27
277c77a
40cf73d
12e3caa
a163240
5131d0b
c2c2d03
fd4f1a0
e7b2f63
7523632
769c242
ac3842b
9ca94a2
5615d25
b28a169
4470618
de4d047
0e70139
bf65697
31f2f05
86ef68b
4c70db1
935bc9e
4439d58
de085ad
5a420a6
0915e53
c03bce3
3c896e4
d0c78ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
from extension import * | ||
from .extension import * |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
from amp_example_preview import * | ||
from .amp_example_preview import * |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from inline_text_assets import * | ||
from .inline_text_assets import * |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from jinja2_optimized_codehilite import * | ||
from .jinja2_optimized_codehilite import * |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from log_beautifier import * | ||
from .log_beautifier import * |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import logging | ||
|
||
from grow import extensions | ||
from grow.common import logger | ||
from grow.common import logger, colors | ||
from grow.server import manager | ||
|
||
logger._get_logger = logger.get_logger | ||
|
@@ -29,9 +29,22 @@ def get_logger(name='pod'): | |
def print_server_ready_message(pod, host, port): | ||
home_doc = pod.get_home_doc() | ||
root_path = home_doc.url.path if home_doc and home_doc.exists else '/' | ||
url = 'http://{}:{}{}'.format(host, port, root_path) | ||
url_base = 'http://{}:{}/'.format(host, port) | ||
url_root = 'http://{}:{}{}'.format(host, port, root_path) | ||
logger.LOGGER.info('Grow started successfully.') | ||
return url | ||
|
||
messages = manager.ServerMessages() | ||
messages.add_message('Pod:', pod.root, colors.HIGHLIGHT) | ||
messages.add_message('Server:', url_root, colors.HIGHLIGHT) | ||
|
||
# Trigger the dev manager message hook. | ||
extra_urls = pod.extensions_controller.trigger( | ||
'dev_manager_message', messages.add_message, url_base, url_root) or [] | ||
|
||
messages.add_message( | ||
'Ready.', 'Press ctrl-c to quit.', colors.SUCCESS, colors.SUCCESS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
||
return (url_root, extra_urls) | ||
|
||
manager.print_server_ready_message = print_server_ready_message | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
from grow.documents import document_format | ||
from grow.extensions import hooks | ||
from markdown.extensions import extra | ||
from html_block_processor import HtmlBlockProcessor | ||
from .html_block_processor import HtmlBlockProcessor | ||
|
||
CLEAR_EXTRA_EXTENSIONS_FLAG = 'prevent_markdown_extra_auto_loading_other' | ||
|
||
|
@@ -52,7 +52,7 @@ class MarkdownInHtmlExtension(extensions.BaseExtension): | |
def __init__(self, pod, config): | ||
super(MarkdownInHtmlExtension, self).__init__(pod, config) | ||
|
||
if config.has_key(CLEAR_EXTRA_EXTENSIONS_FLAG) and config.get(CLEAR_EXTRA_EXTENSIONS_FLAG): | ||
if config.__contains__(CLEAR_EXTRA_EXTENSIONS_FLAG) and config.get(CLEAR_EXTRA_EXTENSIONS_FLAG): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm... |
||
# Clear the markdown extra extensions to prevent auto loading unwanted extensions | ||
extra.extensions = [] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from markdown_toc_patch import * | ||
from .markdown_toc_patch import * |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from url_beautifier import * | ||
from .url_beautifier import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the idea of this extension is to silence the startup log and we are not printing them anyway, this can be removed.