Skip to content

Commit e4899b0

Browse files
committed
Merge in master
1 parent d2b9976 commit e4899b0

File tree

12 files changed

+284
-79
lines changed

12 files changed

+284
-79
lines changed

CONTRIBUTING.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
Interested in contributing to Jekyll Admin? We’d love your help. Jekyll Admin is an open source project, built one contribution at a time by users like you.
2+
3+
## Where to get help or report a problem
4+
5+
If you think you've found a bug with Jekyll Admin, or if you'd like to propose a new feature check out the [list of open issues](https://github.com/jekyll/jekyll-admin/issues) and if it's not there [open a new one](https://github.com/jekyll/jekyll-admin).
6+
7+
## Ways to contribute
8+
9+
* Add Jekyll Admin to an existing site. Does it work? Does it do what you'd expect? Anything else you'd like to see? If you have any suggestions, [open an issue](https://github.com/jekyll/jekyll-admin/issues/new)
10+
11+
* Comment on some of the project’s [open issues](https://github.com/jekyll/jekyll-admin/issues/). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better?
12+
13+
* Read through [the documentation](http://jekyll.github.com/jekyll-admin), and click the “improve this page” button, any time you see something confusing, or have a suggestion for something that could be improved.
14+
15+
* Find an [open issue](https://github.com/jekyll/jekyll-admin/issues/) (especially those labeled `help-wanted`), and submit a proposed fix. If it’s your first pull request, we promise we won’t bite, and are glad to answer any questions.
16+
17+
* Help evaluate [open pull requests](https://github.com/jekyll/jekyll-admin/pulls/), by testing the changes locally and reviewing what’s proposed.
18+
19+
## Submitting a pull request
20+
21+
### Pull requests generally
22+
23+
* The smaller the proposed change, the better. If you'd like to propose two unrelated changes, submit two pull requests.
24+
25+
* The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.
26+
27+
* Pull request are easy and fun. If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
28+
29+
* If you're submitting a code contribution, be sure to read the [code contributions](#code-contributions) section below.
30+
31+
### Submitting a pull request via github.com
32+
33+
Many small changes can be made entirely through the github.com web interface.
34+
35+
1. Navigate to the file within [`jekyll/jekyll-admin`](https://github.com/jekyll/jekyll-admin) that you'd like to edit.
36+
2. Click the pencil icon in the top right corner to edit the file
37+
3. Make your proposed changes
38+
4. Click "Propose file change"
39+
5. Click "Create pull request"
40+
6. Add a descriptive title and detailed description for your proposed change. The more information the better.
41+
7. Click "Create pull request"
42+
43+
That's it! You'll be automatically subscribed to receive updates as others review your proposed change and provide feedback.
44+
45+
### Submitting a pull request via Git command line
46+
47+
1. Fork the project by clicking "Fork" in the top right corner of [`jekyll/jekyll-admin`](https://github.com/jekyll/jekyll-admin).
48+
2. Clone the repository locally `git clone https://github.com/<you-username>/jekyll-admin`.
49+
3. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ).
50+
4. Hack away, add tests. Not necessarily in that order.
51+
5. Make sure everything still passes by running `script/cibuild` (see [the tests section](#running-tests-locally) below)
52+
6. Push the branch up ( `git push origin my-awesome-feature` ).
53+
7. Create a pull request by visiting `https://github.com/<your-username>/jekyll-admin` and following the instructions at the top of the scree
54+
55+
## Proposing updates to the documentation
56+
57+
We want the Jekyll Admin documentation to be the best it can be. We've open-sourced our docs and we welcome any pull requests if you find it lacking. Any time you propose a code change, you should also include updates to the documentation and tests within the same pull request.
58+
59+
If your contribution changes any Jekyll Admin behavior, make sure to update the documentation. Documentation lives in the `/docs` folder (spoiler alert: it's a Jekyll site!). If the docs are missing information, please feel free to add it in. Great docs make a great project. Include changes to the documentation within your pull request, and once merged, the site will be updated.
60+
61+
### How to submit changes
62+
63+
You can find the documentation in the [`/docs`](https://github.com/jekyll/jekyll-admin/tree/master/docs) directory. See the section above, [submitting a pull request](#submitting-a-pull-request) for information on how to propose a change.
64+
65+
### Previewing changes locally
66+
67+
1. `script/bootstrap`
68+
2. `script/docs-server`
69+
3. Open [localhost:4000/jekyll-admin](http://localhost:4000/jekyll-admin) in your browser

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[![Build Status](https://travis-ci.org/jekyll/jekyll-admin.svg?branch=master)](https://travis-ci.org/jekyll/jekyll-admin)
2+
3+
A Jekyll plugin that provides users with a traditional CMS-style graphical interface to author content and administer Jekyll sites. The project is divided into two parts. A Ruby-based HTTP API that handles Jekyll and filesystem operations, and a Javascript-based front end, built on that API.
4+
5+
![screenshot of Jekyll Admin](https://cloud.githubusercontent.com/assets/282759/17258537/62e23ed6-5595-11e6-89b0-31c787f0492a.png)
6+
7+
## Installation
8+
9+
Refer to [Install Plugins](https://jekyllrb.com/docs/plugins/#installing-a-plugin) in Jekyll docs and install the `jekyll-admin` plugin as you would normally by adding `jekyll-admin` to your Gemfile and `_config.yml`'s `gems` list.
10+
11+
## Usage
12+
13+
1. Start Jekyll as you would normally (`bundle exec jekyll serve`)
14+
2. Navigate to `http://localhost:4000/admin` to access the administrative interface
15+
16+
## Contributing
17+
18+
Interested in contributing to Jekyll Admin? We’d love your help. Jekyll Admin is an open source project, built one contribution at a time by users like you. See [the contributing instructions](CONTRIBUTING.md), and [the development docs](http://jekyll.github.io/jekyll-admin/development/) for more information.
19+
20+
## License
21+
22+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

docs/_layouts/page.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
layout: default
3+
---
4+
5+
<article class="post">
6+
7+
<header class="post-header">
8+
<h1 class="post-title">{{ page.title | escape }}</h1>
9+
{% if page.description %}
10+
<h2 class="lede">{{ page.description }}</h2>
11+
{% endif %}
12+
</header>
13+
14+
<div class="post-content">
15+
{{ content }}
16+
</div>
17+
18+
</article>
19+
20+
<p>
21+
<em>
22+
Found a mistake? See something that can be made better? These docs are open source. <br />
23+
Please help <a href="https://github.com/{{ site.github.repository_nwo }}/edit/master/{{ page.path }}">improve this page</a>.
24+
</em>
25+
</p>

docs/frontend/actions.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,163 @@
1-
# Action Creators
2-
Actions are payloads of information that send data from the application to the store.
1+
---
2+
title: Actions
3+
permalink: /frontend/actions/
4+
description: Actions are payloads of information that send data from the application to the store.
5+
---
36

47
## Configuration
58

69
### `fetchConfig`
10+
711
Async action for fetching Jekyll project configuration (`_config.yml`)
812

913
### `putConfig(config)`
14+
1015
Async action for updating Jekyll project configuration
1116

1217
### `onEditorChange`
13-
Action for notifying whether the YAML editor has changed after last update
1418

19+
Action for notifying whether the YAML editor has changed after last update
1520

1621
## Pages
1722

1823
### `fetchPages`
24+
1925
Async action for fetching an array of page objects.
2026

2127
### `fetchPage(id)`
28+
2229
Async action for fetching the requested page.
2330

2431
### `putPage(id)`
32+
2533
Async action for creating/updating the requested page. The edited/new content comes
2634
from `state.metadata`
2735

2836
### `deletePage(id)`
29-
Async action for deleting the requested page.
3037

38+
Async action for deleting the requested page.
3139

3240
## Collections
3341

3442
### `fetchCollections`
43+
3544
Async action for fetching an array of the registered collections (including posts).
3645

3746
### `fetchCollection(collection_name)`
47+
3848
Async action for fetching information about the requested collection
3949

4050
### `fetchDocuments(collection_name)`
51+
4152
Async action for fetching an array of documents corresponding to the requested collection. The response does not include the document body.
4253

4354
### `fetchDocument(collection_name, id)`
55+
4456
Async action for fetching the requested document. The response includes the document body.
4557

4658
### `putDocument(id, collection_name)`
59+
4760
Async action for creating/updating the requested document. The response includes the document body. The updated content comes from `state.metadata`
4861

4962
### `deleteDocument(collection_name, id)`
50-
Async action for deleting the document from disk.
5163

64+
Async action for deleting the document from disk.
5265

5366
## Metadata
5467

5568
### `storeContentFields(meta)`
69+
5670
Action that puts the current document's meta in the redux store.
5771

5872
### `addField(namePrefix)`
73+
5974
Action that adds empty value to given path in metadata.
6075

6176
### `removeField(namePrefix, key)`
77+
6278
Action that removes the field with the given `key`. `key` can be object key or
6379
array index.
6480

6581
### `updateFieldKey(namePrefix, fieldKey, newKey)`
82+
6683
Action that updates the key of the field with given path in metadata.
6784

6885
### `updateFieldValue(nameAttr, value)`
86+
6987
Action that updates the value of the field with given path in metadata.
7088

7189
### `moveArrayItem(namePrefix, srcInd, targetInd)`
90+
7291
Action that moves the array item of the field with given path in metadata
7392
to the target index.
7493

7594
### `convertField(nameAttr, convertType)`
95+
7696
Action that converts the field to the given type.
7797

7898
### `updateTitle(title)`
99+
79100
Updates the content title when the input changes.
80101

81102
### `updateBody(body)`
103+
82104
Updates the content body when the markdown editor changes.
83105

84106
### `updatePath(path)`
107+
85108
Updates the content path when the input changes.
86109

87110
### `updateDraft(isDraft)`
88-
Updates the content visibility when the checkbox changes.
89111

112+
Updates the content visibility when the checkbox changes.
90113

91114
## Static Files
92115

93116
### `fetchStaticFiles`
117+
94118
Async action for fetching static files.
95119

96120
### `uploadStaticFiles(files)`
121+
97122
Async action for uploading multiple static files at the same time.
98123
It encodes the uploaded `File` objects to `base64` before sending PUT request.
99124

100125
### `deleteStaticFile(filename)`
101-
Async action for deleting the requested static file.
102126

127+
Async action for deleting the requested static file.
103128

104129
## Data Files
105130

106131
### `fetchDataFiles`
132+
107133
Async action for fetching data files.
108134

109135
### `fetchDataFile(filename)`
136+
110137
Async action for fetching the requested data file.
111138

112139
### `putDataFile(filename, data)`
140+
113141
Async action for creating/updating the requested data file. It validates the given filename and data before the PUT request.
114142

115143
### `deleteDataFile(filename)`
144+
116145
Async action for deleting the requested data file.
117146

118147
### `onDataFileChanged`
119-
Action for keeping track of the updated form fields.
120148

149+
Action for keeping track of the updated form fields.
121150

122151
## Utils
123152

124153
### `search(input)`
154+
125155
Action for storing search input from the user
126156

127157
### `validationError(errors)`
158+
128159
Action for storing form errors.
129160

130161
### `clearErrors`
162+
131163
Action for clearing form errors if any.

0 commit comments

Comments
 (0)