Blacklight Quick Start - blacklight-cms/blacklight-core GitHub Wiki
Required Dependencies
- Node.js (https://nodejs.org/en/download/package-manager/)
- GIT (https://git-scm.com/downloads)
- ImageMagick (https://www.imagemagick.org/script/binary-releases.php)
- Valid credentials and permissions for Gitlab (https://gitlab.entropy.cc/fs-blacklight/fs-blacklight) and FS Stage AEM instance (https://author13.stage.fourseasons.com)
- An SSH key configured in your Gitlab account (https://docs.gitlab.com/ce/ssh/README.html)
Overview
Blacklight is a Content Management System (CMS) and web server that runs on the Node.js platform and works with Apache Sling-based content repositories for data storage.
Below are the basic steps to get a new Blacklight instance up and running in your environment.
Install Node.js and Blacklight
- If you haven't already, install the latest LTS version of Node.js
- If you haven't already, install the Blacklight cli tool with the following command:
> npm install -g blacklight-cli
> bl --help ## To confirm successful install
- Add the
blcd
helper command to your.bash_profile
or.bashrc
file.Note: This step is optional, but recommended because theblcd
command can greatly expedite navigation of Blacklight's directory structure from a command shell.
## Add this to .bash_profile or .bashrc:
blcd(){
cd `bl module folder $1`
}
Download and Start Sling
Apache Sling comes as a standalone .jar file. You can download the latest version of the Apache Sling .jar file via your web browser from the Sling homepage (look for "Downloads" in the left-hand nav bar).
Alternately, you can download the Sling version 8 .jar file from the command line:
> cd ~ ## Or some other folder, if you prefer
> mkdir sling && cd sling
> wget http://apache.mirrors.pair.com/sling/org.apache.sling.launchpad-8.jar
Once the .jar file is downloaded, run it with the following command:
> java -Xmx512M -jar org.apache.sling.launchpad-8.jar -p 4500 & ## Assumes Sling version 8
Then navigate to the Sling homepage to confirm it is working: http://127.0.0.1:4500/
Initialize and Configure a New Blacklight Instance
Create a new, empty Blacklight website by running the following command. Answer the prompts as outlined below.
> cd ~ ## Or some other folder, if you prefer
> bl init my-site
- Git URL -- can be any Git URL you like, including the fake sample URL,
[email protected]:my-site/
- Sling url -- The Sling instance you initiated above is running at http://127.0.0.1:4500
- Sling username -- Is
admin
and password is alsoadmin
. - Website domain name -- Is not important for this test installation of Blacklight. Put in any domain you like.
- Asset path and App path should be left as their default values (just hit enter)
- Email address to receive errors can be left blank
Install a Sample Site Module
To get things going, use the bl
command line tool to install a simple example Blacklight site moudle:
> cd my-site
> bl module install example.doodad --url=https://github.com/blacklight-cms/example.doodad.git
> bl example.doodad make-sample-content ## This command adds `doodad` sample content to Sling
> node index.js ##Start up the Blacklight server
Now navigate to the sample page: http://127.0.0.1:4400/content/example/doodads