Merge branch 'master' of github.com:jorilallo/atlas into tom/static

This commit is contained in:
Tom Moor
2017-10-25 22:48:28 -07:00
22 changed files with 541 additions and 392 deletions

View File

@@ -14,6 +14,11 @@ async function present(ctx: Object, document: Document, options: ?Options) {
...options,
};
ctx.cache.set(document.id, document);
// For empty document content, return the title
if (document.text.trim().length === 0)
document.text = `# ${document.title || 'Untitled document'}`;
const data = {
id: document.id,
url: document.getUrl(),