From e3cd472026a632b7b438bd887997bcfb9ee1fdad Mon Sep 17 00:00:00 2001 From: Jota Teles Date: Fri, 8 Jul 2016 00:17:53 -0300 Subject: [PATCH] closes #25 - Atualizando readme e gitignore --- .gitignore | 1 + frontpress.json => frontpress.json.sample | 0 readme.md | 45 ++++++++++++++++++++++- 3 files changed, 45 insertions(+), 1 deletion(-) rename frontpress.json => frontpress.json.sample (100%) diff --git a/.gitignore b/.gitignore index a0850d2..ce20c16 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /assets/ frontpress.sublime-workspace /src/js/components/frontpress-provider/constants/frontpress.constant.js +frontpress.json diff --git a/frontpress.json b/frontpress.json.sample similarity index 100% rename from frontpress.json rename to frontpress.json.sample diff --git a/readme.md b/readme.md index 011aed9..4c87631 100644 --- a/readme.md +++ b/readme.md @@ -6,13 +6,56 @@ Full front-end AngularJS template for WordPress API. > Oh! It's not another WordPress theme! It's a full website using WordPress API! I can't believe, sweet lord!! :raised_hands: -## Clone, install and run +## 1. Clone, install and run 1. Clone or fork this repository 2. ```npm i && bower i``` 3. ``` gulp ``` 4. Take a look on [http://localhost:4000/](http://localhost:4000/) +## :warning: 2. Provide a frontpress.json configuration file + +Create a file on your projects root folder named ``frontpress.json`` to configure your own project. + +**OR** you can copy this repository file ``frontpress.json.sample`` and rename it to ``frontpress.json``. + + +## Configuration file ``frontpress.json`` + +There are a few options you can configure on your ``frontpress.json`` file. + +| Property name | What it is? | Sample value | Is required? | +|----------------- |------------------------------------------------------------------------ |------------------------------------------------------------------------ |-------------- | +| restApiUrl | The root of your wordpress rest endpoint url. | https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com | true | +| pageSize | How many posts by page. | 5 | false | +| disqusShortname | Your disqus shortname | frontpress | false | +| overrides | An object with propeties to override default values from endpoint api. | Take a look the table bellow | false | + + +### Overrides + +Overrides are part of frontpress.json file and it is object with propeties to override default values from endpoint api. For instance, even if your blog's titlé is 'My blog Title', here you can override this value. + +| Override property | What is it? | Sample value. | +|-------------------|----------------------------------|---------------------------------------------------------------------------------| +| title | Blog title, homepage title tag | "Frontpress - This title is overwritten by frontpress.json configuration file." | + +**None** of overrides values are required. + +**Sample** ``frontpress.json``` file: + +````javascript +{ + "restApiUrl": "https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com", + "pageSize": "5", + "disqusShortname": "frontpress", + "overrides": { + "title": "Frontpress - This title is overwritten by frontpress.json configuration file." + } +} +```` + + ## API Documentation We support the 1.1 and 1.2 version of WordPress Rest API. Supported resources are: