Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/AdFabConnect/abejs into s…
Browse files Browse the repository at this point in the history
…tructure_editor

# Conflicts:
#	src/cli/cms/editor/form.js
#	src/cli/cms/templates/index.js
#	src/cli/cms/templates/template.js
#	src/cli/index.js
#	src/server/controllers/index.js
#	src/server/public/scripts/modules/EditorAutocomplete.js
#	src/server/public/scripts/modules/FormCreate.js
#	src/server/routes/get-main.js
#	src/server/routes/index.js
#	src/server/views/partials/menu-left.html
  • Loading branch information
wonknu committed Dec 5, 2016
2 parents f9b1f09 + 16cf2ab commit b789ffd
Show file tree
Hide file tree
Showing 425 changed files with 46,421 additions and 1,769 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
src/server/public/libs
src/server/public/scripts/admin-compiled.js
src/server/public/scripts/template-engine-compiled.js
src/server/public/scripts/template-engine-compiled.js
src/server/public/scripts/user-login-compiled.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/*
npm-debug.log
selenium-debug.log
tasks/node_modules/*
tasks/json/*
tasks/npm-debug.log
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ plugins/
.travis.yml
.eslintrc.json
.eslintignore
abe.json
abe.json
selenium-debug.log
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@ node_js:
- "5"
- "6"
- "7"
sudo: required
dist: trusty
env:
- NODE_ENV=PROD
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
install:
- npm install
before_script:
- npm run distribute
script:
- jdk_switcher use oraclejdk8
- npm run test-coveralls
- npm run test-func
- npm run lint
534 changes: 534 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

> Abe is your __static websites generator__ with revolutionnary __self-descriptive__ templates
[![NPM](https://nodei.co/npm/abe-cli.png?downloads=true&downloadRank=true)](https://nodei.co/npm/abe-cli/)
[![NPM](https://nodei.co/npm-dl/abe-cli.png?months=3&height=3)](https://nodei.co/npm/abe-cli/)

# Demo
Deploy your own Abe demo on Heroku

Expand All @@ -32,6 +35,28 @@ The separation between the engine, the API server and the front will be reinforc
The documentation will be rewritten and included in the modules
As a major new feature, it will be possible to create a template from partials.

## Roadmap of the next 2.x releases
- the stateful manager of Abe has to become responsible of pagination of articles (huge performance boost)
- A homepage will arrive (at last !) on the frontend
- It will be possible to create filtered views on the manager frontend
- Refactoring of the editor has to be done
- Unit testing will cover >60% of the code
- A full functional test scenario from blog creation to article manipulation will be written
- The load testing scenarii will be open sourced (based on Locust)
- Bugfixing
- Precompiling of templates has to be fully tested
- since Abe has become stateful, clustering has been removed. Implement a solution to permit clusters of Abe
- Add template creation from partials
- Structure will be editable from abe, as references
- templates and partials will be uploadable
- Video training will be produced

## Roadmap of the 3.x releases
- Separate the engine, the REST server and the client
- rewrite the client in react
- create an Electron version
- More to come !

## Changelog
See the complete [changelog](./CHANGELOG.md)

Expand Down Expand Up @@ -158,7 +183,7 @@ Usage: abe [commande] {OPTIONS}
Standard Options:
--version, -V Output the version number
--version, -v Output the version number
--help, -h Show this message
Expand Down
271 changes: 225 additions & 46 deletions docs/abe-attibutes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,234 @@ for example the type text, some required and other optional

are always required for all content type

## Type of abe content
## <a name="abe-type"></a>Type of abe content

- text
- image
- textarea
- translate
- import
- file
- rich
- link
- [text](types/abe-text.md)
- [image](types/abe-image.md)
- [textarea](types/abe-textarea.md)
- [translate](types/abe-translate.md)
- [import](types/abe-import.md)
- [file](types/abe-file.md)
- [rich](types/abe-rich.md)
- [link](types/abe-link.md)
- [data](types/abe-data.md)
- [slug](types/abe-slug.md)

## Other attributes

- desc (String)
- tab (String)
- reload (Boolean)
- required (Boolean)
- visible (Boolean)
- order (Int)
- filetype (String)
- file (String)
- locale (String | variable)
- max-length (Int)
- min-length (Int)
- display (String)
- editable (Boolean)
- source (String | variables)
- autocomplete (Boolean)
- duplicate (Boolean)

## Details

type | example | description | types | Default
--- | --- | --- | --- | ---
desc | ```desc="some description for the contributor"``` | (text only) | all | (null)
tab | ```tab="Image"``` | Will show input into a tab (text only) | all | "default"
reload | ```reload="true"``` | Will reload the page on input blur (usefull to trigger some javascript on change) | all | "false"
required | ```required="true"``` | Calculate completion of content | all | "false"
visible | ```visible="false"``` | will not insert value into html | all | "false"
order | ```order="10"``` | Order input into admin form | all | (null)
filetype | ```filetype="image"``` | for upload | file | (null)
file | ```file="partial.html"``` | for partials import | import | (null)
locale | ```locale="fr"``` | for translate | translate | String or Variable (with {{lang}}) (default null)
max-length | ```max-length="5"``` | List max choice N | data | (null)
min-length | ```min-length="5"``` | List min choice N (used with required attribute) | data | (null)
display | ```display="title"``` | List from json source display title attribute | data | (null)
editable | ```editable="false"``` | List is editable | data | true
source | ```source="[ data source ]"``` | List json value (http url, local url, static json, select sql like) | data | (null)
autocomplete | ```autocomplete="true"``` | change the list to autocomplete | data | false
duplicate | ```duplicate="false"``` | the field will not be duplicate when user duplicate content | all | false
- [tab](#tab)
- [key](#key)
- [type](#type)
- [autocomplete](#autocomplete)
- [desc](#desc)
- [display](#display)
- [editable](#editable)
- [max-length](#max-length)
- [min-length](#min-length)
- [source](#source)
- [duplicate](#duplicate)
- [reload](#reload)
- [required](#required)
- [visible](#visible)
- [order](#order)
- [filetype](#filetype)
- [file](#file)
- [locale](#locale)
- [prefill](#prefill)
- [prefill-quantity](#prefill-quantity)

## <a name="tab"></a>tab (String)

Default: "default"

```html
tab="NameOfTheTab"
```

Set the admin tab display

## <a name="key"></a>key (String)

Default: ""

```html
key="keyData"
```

the key used into json file

## <a name="type"></a>type (String)

Default: "text"

```html
type="text"
```

See abe [type](#abe-type)

## <a name="autocomplete"></a>autocomplete (Boolean)

Default: null

```html
autocomplete="true"
```

for abe type data, display input form autocomplete into admin

## <a name="desc"></a>desc (String)

Default: ""

```html
desc="some description for the contributor"
```

The admin description input

## <a name="display"></a>display (String)

Default: null

```html
display="variable"
```

for abe type data (autocomplete true or false)

## <a name="editable"></a>editable (Boolean)

Default: true

```html
editable="true"
```

if editable true user can change the value, if not abe will set the values

## <a name="max-length"></a>max-length (Int)

Default: null

```html
max-length="3"
```

for abe type data, array max selection

## <a name="min-length"></a>min-length (Int)

Default: 0

```html
min-length="1"
```

for abe type data, array min selection (if required)

## <a name="source"></a>source (String | variables)

Default: null

```html
source="[ source type ]"
```

see abe type [data](abe-data.md)

## <a name="duplicate"></a>duplicate (Boolean)

Default: true

```html
duplicate="true"
```

if set to false, when user duplicate a post. The value will not be diplcate into the new post

## <a name="reload"></a>reload (Boolean)

Default: false

```html
reload="true"
```

if reload true, on blur event on the input field the post preview will be reloaded

## <a name="required"></a>required (Boolean)

Default: false

```html
required="true"
```

If set to true user cannot publish the post without required field

## <a name="visible"></a>visible (Boolean)

Default: true

```html
visible="true"
```

if visible set to false, the value will not be set into post page (but will be visible on the admin and set into the json file)

## <a name="order"></a>order (Int)

Default: 0

```html
order="1"
```

to order the input in the admin

## <a name="filetype"></a>filetype (String)

Default: ""

```html
filetype="image"
```

## <a name="file"></a>file (String)

Default: ""

```html
file="partial.html"
```

see abe [import](abe-import.md)

## <a name="locale"></a>locale (String | variable)

Default: ""

```html
locale="fr"
```

## <a name="prefill"></a>prefill (Boolean)

Default: false

```html
prefill="true"
```

For abe type data, if set to true will add default values

## <a name="prefill-quantity"></a>prefill-quantity (Int)

Default: null

```html
prefill-quantity="3"
```

How many default values to prefill
15 changes: 15 additions & 0 deletions docs/abe-handlebars-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Abe handlebars Variable

> Abe admin is rendered with handlebar engine, global variables are added inside template rendering
# Editor

When on the admin edit view `abeEditor` is set to `true` otherwise set to `false`

```html
{{#if abeEditor}}
Html rendered inside post when user edit the post
{{else}}
Html rendered when user "publish" the post (final output)
{{/if}}
```

0 comments on commit b789ffd

Please sign in to comment.