Skip to content

Commit

Permalink
Merge branch 'gh-pages' of https://github.com/prose/prose into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
samanpwbb committed Jun 20, 2012
2 parents 0a2112f + 5804a8c commit 7365158
Show file tree
Hide file tree
Showing 25 changed files with 47 additions and 93 deletions.
19 changes: 13 additions & 6 deletions _includes/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,31 +218,38 @@ function movePost(user, repo, branch, path, newPath, cb) {
// Prepare new empty post

function emptyPost(user, repo, branch, path, cb) {
var rawMetadata = "";
var rawMetadata = "layout: default\npublished: false";
var metadata = {
"layout": "default",
"published": false,
};

var cfg = app.state.config
if (cfg && cfg.prose && cfg.prose.metadata) {
metadata = cfg.prose.metadata[path];
if (cfg.prose.metadata[path]) {
metadata = cfg.prose.metadata[path];
try {
rawMetadata = YAML.encode(metadata);
} catch(err) {
console.log('ERROR encoding YAML');
// No-op
}
}
}
rawMetadata = _.toYAML(metadata);


var repo = github().getRepo(user, repo);
cb(null, {
"metadata": metadata,
"raw_metadata": rawMetadata,
"content": "How does it work?\n=================\n\nEnter Text in Markdown format.",
"content": "# How does it work?\n\nEnter Text in Markdown format.",
"repo": repo,
"path": path,
"persisted": false,
"file": new Date().format("Y-m-d")+"-your-filename.md"
});
}


// Load Post
// -------
//
Expand Down Expand Up @@ -279,4 +286,4 @@ function loadPost(user, repo, branch, path, file, cb) {
var post = parse(data);
cb(err, _.extend(post, {"markdown": isMarkdown(file), "jekyll": app.state.jekyll, "repo": repo, "path": path, "file": file, "persisted": true}));
});
}
}
5 changes: 1 addition & 4 deletions _includes/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ ul.site li a {
}

.post-content img {
max-width: 100%;
max-width: 780px;
}

.post-content .meta {
Expand Down Expand Up @@ -1218,9 +1218,6 @@ ul.site li a {
font-weight: 400;
}

.help .articles .article img {
border: #c3ccd0 1px solid;
}

.help-article {
width: 960px;
Expand Down
15 changes: 0 additions & 15 deletions _includes/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@ _.serial = function () {
(_(arguments).reduceRight(_.wrap, function() {}))();
};

// Convert a javascript object to its YAML representation
// IMPORTANT! Not working reliably with nested objects
_.toYAML = function(data) {
function serializeValue(val) {
function serializeArray(a) {
return a.map(function(elem) { return "- "+ elem}).join("\n");
}
if (_.isArray(val)) return "\n"+serializeArray(val);
return _.isNumber(val) || _.isBoolean(val) ? val : "\""+val+"\"";
}
return Object.keys(data).map(function(key) {
return key +": "+ serializeValue(data[key]);
}).join("\n");
};

_.parentPath = function(path) {
return path.replace(/\/?[a-zA-Z0-9_-]*$/, "");
}
Expand Down
6 changes: 5 additions & 1 deletion _includes/vendor/js-yaml.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Prose is great for making quick updates to your code or managing your blog. Pros

[Get started now](/help/getting-started.html) or learn more about [using Jekyll to design flexible static websites](http://developmentseed.org/blog/2011/09/09/jekyll-github-pages/).

![Screen shot of the Prose interface](https://dl.dropbox.com/u/22916323/images/prose/about-prose-screenshot.png)
![Screen shot of the Prose interface](https://github.com/prose/prose/raw/gh-pages/images/screenshots/edit.png)


## Future plans
Expand All @@ -24,4 +24,4 @@ This is a first release dedicated to developers at this early stage. It will be

## Get involved

Prose is 100% open source. We encourage you to contribute and help us improve this application to make website development and maintainance easier. Start contributing by filing tickets on Github or touch the [codebase](http://github.com/prose).
Prose is 100% open source. We encourage you to contribute and help us improve this application to make website development and maintainance easier. Start contributing by filing tickets on Github or touch the [codebase](http://github.com/prose).
41 changes: 0 additions & 41 deletions _posts/help/2012-06-17-your-filename.md

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: help
title: Getting Started
descr: A brief introduction on how to use Prose, what it can do for you and what not.
image: http://farm7.staticflickr.com/6119/6884293596_b44a31bf0a_m.jpg
image: http://prose.io/images/help/getting-started.png
author_twitter: _mql
author: Michael Aufreiter
categories:
Expand All @@ -12,50 +12,50 @@ published: true

This little guide walks you through the process of using Prose to manage your website.

# Create your first Jekyll webpage if you haven't already
# Create your first Jekyll webpage

We've created a simple Jekyll-based website that you can use as a starting point, [Prose Bootrap](http://bootstrap.prose.io). All you have to do is creating a fork of the repository and give it a suitable new name. Please follow the steps described on the Bootstrap homepage. If you already maintaining a Jekyll page you can skip this step.
We've created a simple template that you can use as a starting point, [Prose Bootrap](http://bootstrap.prose.io). All you have to do is creating a fork of the [repository](http://github.com/prose/bootstrap) and give it a suitable new name. Please follow the steps described on the Bootstrap homepage. If you are already maintaining a Jekyll page you can skip this step.

# Open Prose

Navigate to [Prose.io](http://prose.io). Now you can sign in to Github by using OAuth.
Navigate to [Prose.io](http://prose.io). Now you can sign in to [Github](http://github.com) by using OAuth.

![Start](http://f.cl.ly/items/0t0A170b2Y093F2u1w45/Screen%20Shot%202012-05-23%20at%205.48.45%20PM.png)
![Start](https://github.com/prose/prose/raw/gh-pages/images/screenshots/start.png)


# Browse Repositories

Here's the landing page, it gives you all the repositories you have access to. If a Jekyll site has multiple branches, you are prompted to select your desired branch, otherwise you jump into the repo directly. We're going to pick our fresh bootstraped site here.
The landing page gives you all the repositories you have access to. If a Jekyll site has multiple branches, you are prompted to select your desired branch, otherwise you jump into the repo directly. We're going to pick our fresh bootstraped site here.

![Repositories](http://cl.ly/3p0v3b1q011w123b1O2c/Screen%20Shot%202012-05-23%20at%205.11.42%20PM.png)
![Repositories](https://github.com/prose/prose/raw/gh-pages/images/screenshots/browse-repos.png)


# Browsing Posts

Once you have selected a repository, you can browse your posts and sub-folders in a traditional file-browser-ish manner. You can create new files as well, which immediately opens an empty document for you, which you can save after populating it with some text.

![Posts](http://f.cl.ly/items/0e0D1s292j422S0N3723/Screen%20Shot%202012-05-23%20at%204.58.48%20PM.png)
![Posts](https://github.com/prose/prose/raw/gh-pages/images/screenshots/browse-files.png)


# Edit Posts

Once the file has been loaded, all you have to do is pointing your cursor to the text and start typing. We're providing basic syntax highlighting for Markdown to assist you during the writing process.

![Edit](http://f.cl.ly/items/3E0Q2K3V0M3z1O2j1r1H/Screen%20Shot%202012-05-22%20at%201.53.28%20AM.png)
![Edit](https://github.com/prose/prose/raw/gh-pages/images/screenshots/edit.png)


# Preview

You can instantly preview your writing by either clicking the preview icon at the document menu bar, or `ctrl+shift+right` to toggle it.

![Preview](http://f.cl.ly/items/1t2I3s2o0s3D2u1E270x/Screen%20Shot%202012-05-23%20at%205.03.29%20PM.png)
![Preview](https://github.com/prose/prose/raw/gh-pages/images/screenshots/preview.png)


# Cheatsheet

If you don't write on a daily basis (like me) you might have difficulties to remember the Markdown syntax so we also included a cheatsheet that you can use for reference. You reach it by pressing `ctrl+shift+left`.

![Preview](http://f.cl.ly/items/1t2I3s2o0s3D2u1E270x/Screen%20Shot%202012-05-23%20at%205.03.29%20PM.png)
![Preview](https://github.com/prose/prose/raw/gh-pages/images/screenshots/cheatsheet.png)


# Publish
Expand All @@ -69,16 +69,14 @@ Once you are ready, you can easily publish your article, which lets it show up o

Take full control about your post, and edit Metadata aka the YAML frontmatter. No limitations.

![Repositories](http://f.cl.ly/items/1v0a3E0C1Z3z2s3N473v/Screen%20Shot%202012-05-23%20at%205.04.01%20PM.png)
![Repositories](https://github.com/prose/prose/raw/gh-pages/images/screenshots/metadata.png)


# Not just for Jekyll

The editor not only supports Jekyll websites but can be used to edit any github repository (respectively any contained text file). You can use it to edit `server.js` of your Node.js application for instance.

![Using the editor for source code](http://f.cl.ly/items/3p2a0a3C3A1I0c3n2o21/Screen%20Shot%202012-06-12%20at%203.12.12%20PM.png)

However, if navigate to a Jekyll repository, the editor is smart enough to expose everything below `_posts` and provide a the metadata editor along with the markdown preview panel.
However, if you navigate to a Jekyll repository, the editor is smart enough to expose everything below `_posts` and provide a the metadata editor along with the markdown preview panel.

# Suitable for writers

Expand All @@ -91,6 +89,3 @@ Prose is also suitable as a full-featured writing environment, covering authorin

Prose is similiar to [iAWriter](http://www.iawriter.com/) as it is also using a minimal interface for editing Markdown, but it's web-based and uses [Github](http://github.com) for storing your text so your writings are more than save and Github keeps a history of every saved version. So Prose can potentially be seen as a whole new way of sharing documents online, while utilizing the usual suspects Markdown and Github. Oh and it's free and open source.




Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
layout: help
title: Handbook
descr: A reference guide. In progress.
image: http://farm7.staticflickr.com/6119/6884293596_b44a31bf0a_m.jpg
image: http://prose.io/images/help/handbook.png
author_twitter: _mql
author: Michael Aufreiter
categories:
- help
published: true
---

This section has not yet been finsished. We're going to cover certain aspects related to using Prose.io.
This handbook is a work in progress. We're going to cover certain aspects related to using Prose.io. It's intended to be extended on-demand as questions come up. We'd like to invite you to contribute to the documentation. Just modify [this file](https://github.com/prose/prose/blob/gh-pages/_posts/help/2012-06-20-handbook.md), and send us pull requests.

# Getting started

See the [Getting started guide](http://prose.io/help/getting-started.html).

# Configuration of your site

Expand All @@ -20,7 +23,6 @@ Configuration is optional, but in many cases you might want to have more control
## Set Root URL

In order to restrict access to a certain directory you can specify a `rooturl` property.


auto: true
server: true
Expand Down Expand Up @@ -49,12 +51,16 @@ Metadata defaults can be used to prepopulate metadata of posts based on the dire
# Troubles?

This is brand new software, and there are some known issues you should be aware of.
This is brand-new software, and there are some known issues you should be aware of.

## I get an error while saving a post
## I get an error while saving a post.

This happens if you do subsequent saves within a short period of time. The Github API takes a while until it recognizes the latest changes. We're working on overcoming this issue. But until we have a solution, you should just wait ~ 30seconds and hit save again.

## I have deleted a file, but it's still there.

Wait a little bit. Then refresh. It may take some time until the Github API is reflecting the changes.




Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: help
title: Internals
descr: A little background on how we implemented Prose.
image: http://farm7.staticflickr.com/6119/6884293596_b44a31bf0a_m.jpg
image: http://prose.io/images/help/internals.png
author_twitter: _mql
author: Michael Aufreiter
categories:
Expand Down Expand Up @@ -72,3 +72,4 @@ The Github API comes with a number of limitations because of its low-level natur
- Deleting and renaming files

This requires a full tree to be written involving a new commit that points to that tree. In fact this is not a big problem with small repositories, but once they get bigger it's not only a performance issue, you'll get errors. Be aware that you may not (yet) be able to rename or delete files when working with bigger repositories.

File renamed without changes.
Binary file added images/help/getting-started.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/help/handbook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/help/internals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/boostrap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/browse-files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/browse-repos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/cheatsheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/github-app-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/metadata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/publish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshots/start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7365158

Please sign in to comment.