Skip to content

Commit f27e568

Browse files
committed
Merge pull request #560 from cortex-cms/topic/docs-and-onboarding-refresh
Onboarding and Documentation Refresh
2 parents f5fcc5d + e112003 commit f27e568

File tree

18 files changed

+596
-1193
lines changed

18 files changed

+596
-1193
lines changed

CONTRIBUTING.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ further improvements or alternatives, or the community at large may have input.
4646
Some things that will increase the chances that your pull request will be accepted:
4747

4848
* Write [good tests][tests]
49-
* Write [good commit messages][commit]
49+
* Write [good][good-commit], [semantic][semantic-commit] commit messages
5050
* Be consistent
5151
* If applicable, suggest additional options or alternatives, follow-up issues or potential future improvements
5252

53-
[issue]: https://github.com/cbdr/cortex/issues
53+
[issue]: https://github.com/cortex-cms/cortex/issues
5454
[tests]: http://betterspecs.org
55-
[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
56-
[setup]: https://github.com/cbdr/cortex#setup
57-
[pr]: https://github.com/cbdr/cortex/compare
58-
[test-suite]: https://github.com/cbdr/cortex#running-test-suite
55+
[good-commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
56+
[semantic-commit]: https://seesparkbox.com/foundry/semantic_commit_messages
57+
[setup]: https://docs.cortexcms.org/basics/setup/manual-setup
58+
[pr]: https://github.com/cortex-cms/cortex/compare
59+
[test-suite]: https://docs.cortexcms.org/basics/setup/core-and-plugin-development#running-test-suite

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
cortex (0.1.0)
4+
cortex (0.1.1)
55
addressable (~> 2.5.2)
66
awesome_nested_set (~> 3.1.4)
77
breadcrumbs_on_rails (~> 3.0.1)

README.md

+4-215
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Cortex CMS [![Build Status](https://semaphoreci.com/api/v1/projects/ec90715a-da8f-4960-bb64-f371850f9c98/813409/shields_badge.svg)](https://semaphoreci.com/content-enablement/cortex) [![Code Climate](https://codeclimate.com/repos/53f62c2869568018180036c9/badges/78e3c3c865b118bbd72b/gpa.svg)](https://codeclimate.com/repos/53f62c2869568018180036c9/feed) [![Test Coverage](https://codeclimate.com/repos/53f62c2869568018180036c9/badges/78e3c3c865b118bbd72b/coverage.svg)](https://codeclimate.com/repos/53f62c2869568018180036c9/coverage) [![Documentation Status](https://www.gitbook.com/button/status/book/cortex-cms/cortex-cms)](https://docs.cortexcms.org/)
1+
# Cortex CMS Engine [![Build Status](https://semaphoreci.com/api/v1/projects/ec90715a-da8f-4960-bb64-f371850f9c98/813409/shields_badge.svg)](https://semaphoreci.com/content-enablement/cortex) [![Code Climate](https://codeclimate.com/repos/53f62c2869568018180036c9/badges/78e3c3c865b118bbd72b/gpa.svg)](https://codeclimate.com/repos/53f62c2869568018180036c9/feed) [![Test Coverage](https://codeclimate.com/repos/53f62c2869568018180036c9/badges/78e3c3c865b118bbd72b/coverage.svg)](https://codeclimate.com/repos/53f62c2869568018180036c9/coverage)
22
<img align="right" height="150"
33
src="https://hiring-assets.careerbuilder.com/branding/cortex-logo.svg"
44
alt="Cortex CMS Logo">
@@ -7,220 +7,9 @@ Cortex CMS is a [multitenant](https://en.wikipedia.org/wiki/Multitenancy) identi
77

88
Cortex follows a decentralized, API-only architecture - it is *not* built like Wordpress or Drupal, which are considered monolithic, all-in-one solutions.
99

10-
## Table of Contents
10+
## Documentation
1111

12-
- [Setup](#setup)
13-
- [Environment](#environment)
14-
- [Dependencies](#dependencies)
15-
- [System](#system)
16-
- [OS X](#os-x)
17-
- [Linux](#linux)
18-
- [Application](#application)
19-
- [Database](#database)
20-
- [Server](#server)
21-
- [Deployment](#deployment)
22-
- [Running Test Suite](#running-test-suite)
23-
- [API](#api)
24-
- [Documentation](#documentation)
25-
- [Consuming Cortex](#consuming-cortex)
26-
- [Authorization](#authorization)
27-
- [Content](#content)
28-
- [Localizations](#localizations)
29-
- [Exceptions](#exceptions)
30-
- [Applications Using Cortex](#applications-using-cortex)
31-
- [Troubleshooting](#troubleshooting)
32-
- [Contributing](#contributing)
33-
- [License](#license)
34-
- [Copyright](#copyright)
35-
36-
## Setup
37-
38-
### Environment
39-
40-
Copy and rename the example `.env.example` file as `.env` and modify it to match your environment.
41-
42-
For a rudimentary setup, these variables should be configured:
43-
44-
* Execute `$ bundle exec rails secret` twice to generate both an `APP_SECRET` and `DEVISE_SECRET`
45-
* If the superuser isn't used for the app databases, the `DATABASE_USERNAME` and `DATABASE_PASSWORD` should be set accordingly.
46-
47-
### Dependencies
48-
49-
#### System
50-
51-
##### OS X
52-
53-
* Install the Xcode Command Line tools:
54-
55-
```sh
56-
$ xcode-select --install
57-
```
58-
59-
* Install all Cortex system-wide dependencies (and the `readline` Ruby/`byebug` build dependency) using [Homebrew](http://brew.sh/) from the `Brewfile` via `$ brew install $(cat Brewfile|grep -v "#")`
60-
* Install Ruby via [rbenv](https://github.com/sstephenson/rbenv) or [rvm](https://rvm.io/).
61-
* Enable system agents:
62-
63-
```sh
64-
$ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
65-
$ ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
66-
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
67-
```
68-
69-
and start them with `brew services`:
70-
71-
```sh
72-
$ brew services start postgresql
73-
$ brew services start elasticsearch
74-
$ brew services start redis
75-
```
76-
77-
or `launchctl`:
78-
79-
```sh
80-
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
81-
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
82-
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
83-
```
84-
85-
##### Linux
86-
87-
* Install all Cortex system-wide dependencies (and the `readline` Ruby/`byebug` build dependency) using your distribution's package manager (`pacman`, `apt-get`, `yum`, etc). For example, with Ubuntu's `apt-get`:
88-
89-
```sh
90-
$ apt-get install libreadline6-dev postgresql postgresql-contrib redis-server openjdk-8-jre imagemagick jpegoptim ghostscript
91-
```
92-
93-
Ubuntu and Redhat/Fedora do not have an official `elasticsearch` package - you must use Elasticsearch's repositories for [APT](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html) or [RPM](https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html) or follow these [manual instructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html). The same goes for `phantomjs`. Build from [source](http://phantomjs.org/download.html) or use a [PPA](https://launchpad.net/ubuntu/+ppas?name_filter=phantomjs). Other Linux distributions likely have these as prebuilt packages in their official or user repositories.
94-
95-
* Install Ruby via [rbenv](https://github.com/sstephenson/rbenv) or [rvm](https://rvm.io/).
96-
* Enable system agents using your distribution's service manager frontend, which is likely `systemd`'s frontend, `systemctl`:
97-
98-
```sh
99-
$ systemctl enable postgresql
100-
$ systemctl enable elasticsearch
101-
$ systemctl enable redis
102-
```
103-
104-
and start them with `systemctl`:
105-
106-
```sh
107-
$ systemctl start postgresql
108-
$ systemctl start elasticsearch
109-
$ systemctl start redis
110-
```
111-
112-
#### Application
113-
114-
* Install Bundler and its dependencies:
115-
116-
```sh
117-
$ gem install bundler && bundle install
118-
```
119-
120-
* Install `node`, then run Yarn to install frontend dependencies:
121-
122-
```sh
123-
$ yarn install
124-
```
125-
126-
### Database
127-
128-
* Create databases:
129-
130-
```sh
131-
$ bin/rails db:create
132-
```
133-
134-
* Initialize the schema:
135-
136-
```sh
137-
$ bin/rails db:schema:load
138-
```
139-
140-
* Seed database with a top-level tenant, the superuser and Custom Content data, then rebuild the ElasticSearch index:
141-
142-
```sh
143-
$ bundle exec rake db:seed
144-
$ bundle exec rake cortex:core:db:reseed
145-
$ bundle exec rake cortex:rebuild_indexes
146-
```
147-
148-
### Server
149-
150-
Start Cortex, Sidekiq and live rebuild/reload via Foreman:
151-
152-
```sh
153-
$ gem install foreman
154-
$ foreman start -f Procfile.dev-server
155-
```
156-
157-
The admin interface should now be accessible locally on port `3000`. To access Cortex as superadmin, login as `[email protected]` with password `welcome1`.
158-
159-
### Deployment
160-
161-
Deploying the `development` environment as a non-local server will require an additional environmental variable be set:
162-
163-
```shell
164-
DEPLOYED=true
165-
```
166-
167-
This will configure various things to behave normally in a deployed scenario.
168-
169-
## Running Test Suite
170-
171-
Initialize the test database:
172-
173-
```sh
174-
$ RAILS_ENV=test bundle exec rake db:schema:load db:seed cortex:core:db:reseed
175-
$ RAILS_ENV=test bundle exec rake cortex:rebuild_indexes
176-
```
177-
178-
To run Ruby and JS specs, utilize:
179-
180-
```sh
181-
$ RAILS_ENV=test bundle exec rake spec
182-
$ RAILS_ENV=test bundle exec rake spec:javascript
183-
```
184-
185-
## API
186-
187-
### Documentation
188-
189-
Cortex's live API documentation is available via Swagger. This contains specific endpoints, parameters, and response models.
190-
191-
SwaggerUI is provided at [http://docs.api.cbcortex.com/](http://docs.api.cbcortex.com).
192-
193-
Swagger Endpoints are available at [http://api.cbcortex.com/api/v1/swagger_doc.json](http://api.cbcortex.com/api/v1/swagger_doc.json).
194-
195-
## Consuming Cortex
196-
197-
### Authorization
198-
199-
Cortex's API utilizes [OAuth2](https://tools.ietf.org/html/rfc6749) for Authentication and Authorization. Client Credentials and Authorization Code [grant types](http://alexbilbie.com/2013/02/a-guide-to-oauth-2-grants/) are supported. Want to get up and running quickly with OAuth? Use Cortex's [Ruby client](https://github.com/cortex-cms/cortex-client-ruby) or [OmniAuth strategy](https://github.com/cb-talent-development/omniauth-cortex) for Client Credentials and Authorization Code grants, respectively.
200-
201-
Before an application can consume any data, OAuth credentials must be created for the consuming application in the 'Applications' section of the Cortex admin interface.
202-
203-
### Content
204-
205-
Content can be consumed from a feed or via the resource's endpoint directly. Use the [cortex-client](https://github.com/cbdr/cortex-client) gem to easily consume any content resource and use it in your application.
206-
207-
### Localizations
208-
209-
Localizations can be consumed via the client or via [i18n-backend-cortex](https://github.com/cortex-cms/i18n-backend-cortex), which allows easy localization for Rails applications.
210-
211-
### Exceptions
212-
213-
If a consuming or companion application would like to produce Cortex-equivalent exceptions, use the [cortex-exceptions](https://github.com/cb-talent-development/cortex-exceptions) gem.
214-
215-
## Applications Using Cortex
216-
217-
* [Advice and Resources](https://github.com/cbdr/consumer-main/) - Simple Jobseeker Resources platform built atop the Consumer Web site utilizing Legacy Cortex Posts and Rails. Content will eventually be dynamically dispersed across site (result pages, description pages, etc) [Live Site](https://www.careerbuilder.com/advice)
218-
* [Employer](https://github.com/cbdr/employer) - Redesigned Employer Marketing platform utilizing Legacy Cortex Webpages/Snippets and Rails. [Live Site](https://hiring.careerbuilder.com/)
219-
* [CB1 Lander Shell](https://github.com/cbdr/cb1-lander-shell) - Platform for hosting lander pages and experiments, utilizing Legacy Cortex Posts and Sinatra. [Live Site](http://corporate.careerbuilder.com/)
220-
* [CareerBuilder.com](https://github.com/cbdr/consumer-main) - The main Consumer Web site for CB.com uses Legacy Cortex Posts for the [Privacy](https://www.careerbuilder.com/privacy) and [Terms of Service](https://www.careerbuilder.com/terms) pages.
221-
222-
## Troubleshooting
223-
* For OS X / homebrew users: Run `which node` to ensure node is properly linked. The path shown should match homebrew's default installation path (run `which brew` to reveal this). If its not, then run `brew link node` and follow the instructions.
12+
Cortex CMS features a comprehensive [documentation portal](https://docs.cortexcms.org). To get started, refer to the [manual setup guide](https://docs.cortexcms.org/basics/setup/manual-setup).
22413

22514
## Contributing
22615

@@ -234,6 +23,6 @@ Cortex utilizes the Apache 2.0 License. See [LICENSE](LICENSE.md) for details.
23423

23524
## Copyright
23625

237-
Copyright (c) 2018 CareerBuilder, LLC.
26+
Copyright (c) CareerBuilder, LLC.
23827

23928
[cb-ce-github]: https://github.com/cb-talent-development "Content Enablement on GitHub"

app/views/layouts/cortex/application.html.haml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
= title
99
= favicon_link_tag 'cortex/favicon.ico'
1010
= stylesheet_link_tag :application, {media: 'all'}
11-
// = stylesheet_pack_tag 'cortex-bundle', {media: 'all'} # Enable once assets migrated
11+
// = stylesheet_pack_tag 'cortex_cms', {media: 'all'} # Enable once assets migrated
1212
= stylesheet_link_tag 'https://fonts.googleapis.com/icon?family=Material+Icons'
1313
= csrf_meta_tags
1414
%body
@@ -23,8 +23,8 @@
2323
= yield
2424
= render 'cortex/partials/flash'
2525

26-
%script{src: '//cdn.ckeditor.com/4.8.0/standard-all/ckeditor.js', type: 'text/javascript'}
26+
%script{src: '//cdn.ckeditor.com/4.10.0/standard-all/ckeditor.js', type: 'text/javascript'}
2727
= javascript_include_tag :application
28-
= javascript_pack_tag 'cortex'
28+
= javascript_pack_tag 'cortex_cms'
2929
= render 'cortex/partials/trackers/google_analytics' if extra_config[:google_analytics_id?]
3030
= render 'cortex/partials/trackers/qualtrics' if extra_config[:qualtrics_id?]

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "cortex",
3-
"version": "0.1.0",
2+
"name": "cortex-cms",
3+
"version": "0.1.2",
44
"main": "node_package/lib/index.js",
55
"homepage": "https://github.com/cortex-cms/cortex",
66
"repository": {

spec/dummy/app/javascript/packs/cortex.jsx

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import 'cortex-cms';

0 commit comments

Comments
 (0)