Commit acc6c229 authored by Aaron Harder's avatar Aaron Harder

Initial commit of quick start and key concepts, with SVG diagrams

parents
Pipeline #713 skipped
All kinds of reference material.
\ No newline at end of file
# Blacklight CMS
This is the good thing.
[[include:"readme.md"]]
# Blacklight Quick Start
Blacklight is a Content Management System (CMS) and web server that runs on the [Node.js](https://nodejs.org) platform and works with [Apache Sling](https://sling.apache.org/)-based content repositories for data storage.
![img:class=center](/alt/blacklight/docs/images/blacklight-system-diagram-1.svg)
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](https://nodejs.org/)
- If you haven't already, install the [Blacklight cli tool](https://gitlab.entropy.cc/blacklight/blacklight-cli) with the following command:
```bash
> npm install -g git+https://gitlab.entropy.cc/blacklight/blacklight-cli.git
```
- Add the `blcd` helper command to your `.bash_profile` or `.bashrc` file.<br>_Note:_ This step is optional, but recommended because the `blcd` command can greatly expedite navigation of Blacklight's directory structure from a command shell.
```bash
## 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](https://sling.apache.org/) (look for _"Downloads"_ in the left-hand nav bar).
Alternately, you can download the Sling version 8 JAR file from the command line:
```bash
> mkdir /opt/sling ## Or some other folder, if you prefer
> cd /opt/sling
> wget http://apache.mirrors.pair.com/sling/org.apache.sling.launchpad-8.jar
```
Once the **.jar** file is downloaded, run the jar file with the following command:
```bash
> 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.
```bash
> bl init my-site
```
- **Git URL** -- can be use any Git URL you like, including the fake sample URL, `git@gitlab.mycompany.com: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 also `admin`.
- **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:
```bash
> 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
# Sample Edit Dialog
Create a folder and type this file into it:
```javascript
function blang($){
var dialog={
title: "Body Footer Text",
items: {
fields: {
widget:"panel",
items:{
footer_text: { widget:"richtext"}
}
}
}
}
return dialog;
}
```
\ No newline at end of file
This diff is collapsed.
# The Blacklight CLI
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="337px" height="534px" version="1.1" style="background-color: rgb(255, 255, 255);"><defs/><g transform="translate(0.5,0.5)"><rect x="1" y="1" width="240" height="531" fill="#fafafa" stroke="#000000" pointer-events="none"/><g transform="translate(16.5,32.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="189" height="466" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: &quot;Courier New&quot;; color: rgb(26, 26, 26); line-height: 1.2; vertical-align: top; width: 190px; white-space: nowrap; word-wrap: normal;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><div><b>my-site/</b></div><div>  index.js</div><div>  package.json</div><div>  config/</div><div>  npm_modules/</div><div>  <b>blacklight_modules/</b></div><div><font color="#333333">    blacklight/</font></div><div>    my-site/</div><div>    <b>  area-one/</b></div><div>        <font color="#009900">components/</font></div><div>        <font color="#ff8000">public/</font></div><div>        <font color="#cc0000">apps/</font></div><div>        docs/</div><div>      area-two/</div><div>  <b>components/</b></div><div>    my-site/</div><div>    <font color="#009900">  area-one/</font></div><div><font color="#333333">      area-two/</font></div><div>  <b>public/</b></div><div>    my-site/</div><div>     <font color="#ff8000"> area-one/</font></div><div><span>      area-two/</span><font color="#ff8000"><br /></font></div><div>  <b>apps/</b></div><div>    my-site/</div><div>      <font color="#cc0000">area-one/</font></div><div><span>      area-two/</span><font color="#cc0000"><br /></font></div></div></div></foreignObject><text x="95" y="241" fill="#1A1A1A" text-anchor="middle" font-size="15px" font-family="Courier New">[Not supported by viewer]</text></switch></g><path d="M -199 277 L 247 277" fill="none" stroke="#0000cc" stroke-miterlimit="10" transform="rotate(90,24,277)" pointer-events="none"/><path d="M -27 214 L 113 214" fill="none" stroke="#0000cc" stroke-miterlimit="10" transform="rotate(90,43,214)" pointer-events="none"/><g transform="translate(12.5,12.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="219" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(0, 127, 255); line-height: 1.2; vertical-align: top; overflow: hidden; max-height: 26px; max-width: 286px; width: 220px; white-space: normal; word-wrap: normal; font-weight: bold;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Blacklight Module Soft Linking</div></div></foreignObject><text x="110" y="16" fill="#007FFF" text-anchor="middle" font-size="15px" font-family="Helvetica" font-weight="bold">Blacklight Module Soft Linking</text></switch></g><path d="M 9 233 L 111 233" fill="none" stroke="#0000cc" stroke-miterlimit="10" transform="rotate(90,60,233)" pointer-events="none"/><path d="M 195.17 203.67 L 314.33 203.67 Q 324.33 203.67 324.33 213.67 L 324.33 321.17 Q 324.33 331.17 314.33 331.17 L 169.24 331.17" fill="none" stroke="#009900" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 163.24 331.17 L 171.24 327.17 L 169.24 331.17 L 171.24 335.17 Z" fill="#009900" stroke="#009900" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(313.5,282.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="20" height="24" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(102, 102, 102); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><font color="#009900">Soft</font><div><font color="#009900">Link</font></div></div></div></foreignObject><text x="10" y="18" fill="#666666" text-anchor="middle" font-size="11px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 166.83 222 L 294.33 222 Q 304.33 222 304.33 232 L 304.33 396.17 Q 304.33 406.17 294.33 406.17 L 175.07 406.17" fill="none" stroke="#ff8000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 169.07 406.17 L 177.07 402.17 L 175.07 406.17 L 177.07 410.17 Z" fill="#ff8000" stroke="#ff8000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(294.5,362.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="20" height="24" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(102, 102, 102); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><font color="#ff8000">Soft</font><div><font color="#ff8000">Link</font></div></div></div></foreignObject><text x="10" y="18" fill="#666666" text-anchor="middle" font-size="11px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 152.67 240.33 L 274.33 240.33 Q 284.33 240.33 284.33 250.33 L 284.33 463.67 Q 284.33 473.67 274.33 473.67 L 175.9 473.67" fill="none" stroke="#cc0000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 169.9 473.67 L 177.9 469.67 L 175.9 473.67 L 177.9 477.67 Z" fill="#cc0000" stroke="#cc0000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(273.5,431.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="20" height="24" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(102, 102, 102); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;background-color:#ffffff;"><font color="#cc0000">Soft</font><div><font color="#cc0000">Link</font></div></div></div></foreignObject><text x="10" y="18" fill="#666666" text-anchor="middle" font-size="11px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 43.5 233.5 L 110.5 233.5" fill="none" stroke="#0000cc" stroke-miterlimit="10" transform="rotate(90,77,233.5)" pointer-events="none"/><path d="M 19.5 327.5 L 66.5 327.5" fill="none" stroke="#0000cc" stroke-miterlimit="10" transform="rotate(90,43,327.5)" pointer-events="none"/><path d="M 22 401 L 64 401" fill="none" stroke="#0000cc" stroke-miterlimit="10" transform="rotate(90,43,401)" pointer-events="none"/><path d="M 18.5 475.5 L 67.5 475.5" fill="none" stroke="#0000cc" stroke-miterlimit="10" transform="rotate(90,43,475.5)" pointer-events="none"/></g></svg>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment