diff --git a/.gitignore b/.gitignore index 42bba817..8027518c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ site/_site/ coverage .ruby-version .sass-cache +node_modules/ +npm-debug.log diff --git a/README.md b/README.md index ce798672..1152248a 100644 --- a/README.md +++ b/README.md @@ -3,29 +3,28 @@ This is the website of [The Lounge](https://thelounge.github.io/). ## What is The Lounge? The Lounge is a web IRC client. More information can be found at -https://github.com/thelounge/lounge. +. ## Development You need to install [Jekyll](https://jekyllrb.com/): -``` -sudo apt-get install ruby1.9.3 build-essential nodejs-legacy -sudo gem install jekyll redcarpet -``` + sudo apt-get install ruby1.9.3 build-essential nodejs-legacy + sudo gem install jekyll redcarpet Now go ahead and clone: -``` -git clone https://github.com/thelounge/thelounge.github.io -cd thelounge.github.io/ -``` + git clone https://github.com/thelounge/thelounge.github.io + cd thelounge.github.io/ + npm install Run Jekyll: -``` -jekyll serve --watch --safe -``` + jekyll serve --watch --safe + +After you're done editing, make sure to run the linter: + + npm run lint ## License diff --git a/_docs/client/commands.md b/_docs/client/commands.md index b4b0fd18..5bf8afc6 100644 --- a/_docs/client/commands.md +++ b/_docs/client/commands.md @@ -39,8 +39,8 @@ Example: `/close` Aliases: -- [/leave](#leave) -- [/part](#part) +- [/leave](#leave) +- [/part](#part) ## /connect @@ -50,7 +50,7 @@ Example: `/connect irc.freenode.org` Aliases: -- [/server](#server) +- [/server](#server) ## /deop @@ -96,8 +96,8 @@ Example: `/leave` Aliases: -- [/close](#close) -- [/part](#part) +- [/close](#close) +- [/part](#part) ## /me @@ -159,8 +159,8 @@ Example: `/quote` Aliases: -- [/raw](#raw) -- [/send](#send) +- [/raw](#raw) +- [/send](#send) ## /raw @@ -170,8 +170,8 @@ Example: `/raw` Aliases: -- [/quote](#quote) -- [/send](#send) +- [/quote](#quote) +- [/send](#send) ## /say @@ -185,8 +185,8 @@ Example: `/send` Aliases: -- [/quote](#quote) -- [/raw](#raw) +- [/quote](#quote) +- [/raw](#raw) ## /server @@ -196,7 +196,7 @@ Example: `/server irc.freenode.org` Aliases: -- [/connect](#connect) +- [/connect](#connect) ## /slap diff --git a/_docs/client/keyboard_shortcuts.md b/_docs/client/keyboard_shortcuts.md index ce0a84f5..91a8c82c 100644 --- a/_docs/client/keyboard_shortcuts.md +++ b/_docs/client/keyboard_shortcuts.md @@ -15,19 +15,15 @@ order: 3.2 To quickly jump between channels: -__WIN / LINUX:__ +**WIN / LINUX:** -``` -CTRL + UP ARROW # Move up one channel -CTRL + DOWN ARROW # Move down -``` + CTRL + UP ARROW # Move up one channel + CTRL + DOWN ARROW # Move down -__OS X:__ +**OS X:** -``` -COMMAND + UP ARROW # Move up one channel -COMMAND + DOWN ARROW # Move down -``` + COMMAND + UP ARROW # Move up one channel + COMMAND + DOWN ARROW # Move down ## Clear buffer @@ -35,14 +31,10 @@ Quickly hides all the messages in the current channel. _This is the same as `/clear`._ -__WIN / LINUX:__ +**WIN / LINUX:** -``` -CTRL + SHIFT + L -``` + CTRL + SHIFT + L -__OS X:__ +**OS X:** -``` -COMMAND + K -``` + COMMAND + K diff --git a/_docs/deployment/docker.md b/_docs/deployment/docker.md index 7dd8252e..ef5c0241 100644 --- a/_docs/deployment/docker.md +++ b/_docs/deployment/docker.md @@ -24,9 +24,7 @@ To run a container using an official image, follow the steps below; Start the container: -``` -$ docker run --name=thelounge --publish=9000:9000 --detach thelounge/lounge -``` + $ docker run --name=thelounge --publish=9000:9000 --detach thelounge/lounge ### Step 2: @@ -43,26 +41,20 @@ To manually build a Docker image, follow the steps below; Clone the Docker repository of The Lounge: -``` -$ git clone https://github.com/thelounge/docker-lounge.git -$ cd docker-lounge -``` + $ git clone https://github.com/thelounge/docker-lounge.git + $ cd docker-lounge ### Step 2: Build a Docker image according to our [Dockerfile](https://hub.docker.com/r/thelounge/lounge/~/dockerfile/) and name it `lounge`: -``` -$ docker build --tag=lounge . -``` + $ docker build --tag=lounge . ### Step 3: Create a new container named `thelounge` from the `lounge` image and run the app in it: -``` -$ docker run --name=thelounge --publish=9000:9000 --detach lounge -``` + $ docker run --name=thelounge --publish=9000:9000 --detach lounge ### Step 4: diff --git a/_docs/deployment/heroku.md b/_docs/deployment/heroku.md index 1bf248ba..079930a4 100644 --- a/_docs/deployment/heroku.md +++ b/_docs/deployment/heroku.md @@ -31,28 +31,22 @@ This document will explain how to install The Lounge on Heroku. If you want to l Begin by logging in with the [Heroku toolbelt](https://toolbelt.heroku.com/): -``` -heroku login -``` + heroku login ### Step 2: Clone the repository and install The Lounge from source: -``` -git clone https://github.com/thelounge/lounge -cd lounge -npm install -NODE_ENV=production npm run build -``` + git clone https://github.com/thelounge/lounge + cd lounge + npm install + NODE_ENV=production npm run build ### Step 3: In the `lounge/` directory, run: -``` -heroku create -``` + heroku create ### Step 4: (optional) @@ -60,17 +54,13 @@ _This step is only useful if you want to run The Lounge with users accounts._ Create a `Procfile` and edit the content to look like this: -``` -web: node index --private --home /app -``` + web: node index --private --home /app _You can read more about Procfiles [here](https://devcenter.heroku.com/articles/procfile)._ To create users, run the following in the `lounge/` directory: -``` -./index.js --home . add -``` + ./index.js --home . add ### Step 5: @@ -78,13 +68,9 @@ Time to publish to Heroku! If you've made any changes to the repository (like adding users or the Profile), don't forget to save the changes with `git`: -``` -git add . -git commit -m "Added Heroku files" -``` + git add . + git commit -m "Added Heroku files" And with that done, lets go ahead and push to Heroku: -``` -git push heroku -``` + git push heroku diff --git a/_docs/deployment/passenger.md b/_docs/deployment/passenger.md index bf63cc6d..7d3cae19 100644 --- a/_docs/deployment/passenger.md +++ b/_docs/deployment/passenger.md @@ -21,20 +21,16 @@ This document will explain how to install The Lounge on Phusion Passenger. You c Clone the repository and install The Lounge from source: -``` -git clone https://github.com/thelounge/lounge -cd lounge -npm install -NODE_ENV=production npm run build -``` + git clone https://github.com/thelounge/lounge + cd lounge + npm install + NODE_ENV=production npm run build ### Step 3: Add a link from `index.js` to `app.js` (Passenger requires an `app.js` file): -``` -ln index.js app.js -``` + ln index.js app.js ### Step 4: diff --git a/_docs/getting_started/usage.md b/_docs/getting_started/usage.md index 258ca9bf..20d0418c 100644 --- a/_docs/getting_started/usage.md +++ b/_docs/getting_started/usage.md @@ -10,9 +10,7 @@ order: 1.2 Once you've installed The Lounge, go ahead and run: -``` -$ lounge --help -``` + $ lounge --help This will give you an overview of the commands you can use. @@ -22,16 +20,14 @@ _Start the server._ Example: -``` -$ lounge start --port 80 --private -``` + $ lounge start --port 80 --private Options: -- `-p, --port` -- `-h, --host` -- `--public` -- `--private` +- `-p, --port` +- `-h, --host` +- `--public` +- `--private` ## `config` @@ -39,9 +35,7 @@ _Open the configuration file._ Example: -``` -$ lounge config -``` + $ lounge config ## `list` @@ -49,9 +43,7 @@ _List all existing users._ Example: -``` -$ lounge list -``` + $ lounge list ## `add ` @@ -59,9 +51,7 @@ _Add a new user._ Example: -``` -$ lounge add john -``` + $ lounge add john ## `remove ` @@ -69,9 +59,7 @@ _Remove an existing user._ Example: -``` -$ lounge remove john -``` + $ lounge remove john ## `reset ` @@ -79,9 +67,7 @@ _Reset user password._ Example: -``` -$ lounge reset john -``` + $ lounge reset john ## `edit ` @@ -89,9 +75,7 @@ _Edit user configuration file._ Example: -``` -$ lounge edit john -``` + $ lounge edit john # Options @@ -99,15 +83,13 @@ $ lounge edit john _Set the home path. This is the location where The Lounge will look for the `config.js` and the `users/` folder._ -*Also configurable through the environment variable `LOUNGE_HOME`.* +_Also configurable through the environment variable `LOUNGE_HOME`._ Example: -``` -$ lounge --home /app add # add user to /app/users -$ lounge --home /app # start server with /app/config.js -$ LOUNGE_HOME=/app lounge # start server with /app/config.js -``` + $ lounge --home /app add # add user to /app/users + $ lounge --home /app # start server with /app/config.js + $ LOUNGE_HOME=/app lounge # start server with /app/config.js ## `--help` @@ -115,9 +97,7 @@ _Output usage information._ Example: -``` -$ lounge --help -``` + $ lounge --help ## `--version` @@ -125,6 +105,4 @@ _Output the version number._ Example: -``` -$ lounge --version -``` + $ lounge --version diff --git a/_docs/index.md b/_docs/index.md index 64b8f9ba..a2b4b583 100644 --- a/_docs/index.md +++ b/_docs/index.md @@ -6,7 +6,7 @@ order: 0.0 # The Lounge -Welcome to the documentation. __It's currently a work in progress.__ +Welcome to the documentation. **It's currently a work in progress.** ## Help needed @@ -17,11 +17,11 @@ It's simply a collection of Markdown files. You can edit the content directly from the GitHub file editor. -__Edit on GitHub:__ -__[Click here](https://github.com/thelounge/thelounge.github.io/tree/master/_docs)__ +**Edit on GitHub:** +**[Click here](https://github.com/thelounge/thelounge.github.io/tree/master/_docs)** It would be really awesome if people could help us make this documentation the best! Thank you. -— [The Lounge](https://github.com/thelounge) +— [The Lounge](https://github.com/thelounge) diff --git a/_docs/server/configuration.md b/_docs/server/configuration.md index c939d56f..5bc4b942 100644 --- a/_docs/server/configuration.md +++ b/_docs/server/configuration.md @@ -96,13 +96,20 @@ The Lounge ships with 4 themes. [![Zenburn Theme][zenburn_thumb]][zenburn] [example]: /img/screenshots/example_css.png -[example_thumb]: /img/screenshots/example_thumbnail.png (Example CSS) + +[example_thumb]: /img/screenshots/example_thumbnail.png "Example CSS" + [crypto]: /img/screenshots/crypto_css.png -[crypto_thumb]: /img/screenshots/crypto_thumbnail.png (Crypto CSS) + +[crypto_thumb]: /img/screenshots/crypto_thumbnail.png "Crypto CSS" + [morning]: /img/screenshots/morning_css.png -[morning_thumb]: /img/screenshots/morning_thumbnail.png (Morning CSS) + +[morning_thumb]: /img/screenshots/morning_thumbnail.png "Morning CSS" + [zenburn]: /img/screenshots/zenburn_css.png -[zenburn_thumb]: /img/screenshots/zenburn_thumbnail.png (Zenburn CSS) + +[zenburn_thumb]: /img/screenshots/zenburn_thumbnail.png "Zenburn CSS" ## prefetch @@ -165,8 +172,8 @@ Leaving this field empty will default to `~/.lounge/`. Change how the logs will be stored. Remember that logging has to be turned on per user, in their own `user.json`. -- format -- timezone +- format +- timezone Example: @@ -192,16 +199,16 @@ maxHistory: 1000, ## defaults -These are the placeholder values displayed in the __Connect__ form: +These are the placeholder values displayed in the **Connect** form: -- name -- host -- port -- password -- tls -- nick -- realname -- join +- name +- host +- port +- password +- tls +- nick +- realname +- join Example (for Freenode network): @@ -233,9 +240,9 @@ transports: ["polling", "websocket"], These three settings are used to setup SSL on the server side. -- enable -- key -- certificate +- enable +- key +- certificate Example @@ -251,8 +258,8 @@ https: { This setting enables the identd support of The Lounge. -- enable -- port +- enable +- port Example: @@ -277,10 +284,10 @@ oidentd: "~/.oidentd.conf", LDAP authentication settings. This settings are used only when public is set to `false`. -- enable -- url -- baseDN -- primaryKey +- enable +- url +- baseDN +- primaryKey Example: diff --git a/_docs/server/users.md b/_docs/server/users.md index e56c2519..84518a34 100644 --- a/_docs/server/users.md +++ b/_docs/server/users.md @@ -12,16 +12,14 @@ Once you've set up The Lounge, it's time to add your first users. Open your `con When you start The Lounge in "private" mode it will load every user found in your `users/` folder. Here's some of the features users get: -- Stay online on IRC even when you log out -- Lets you chat from multiple devices simultaneously +- Stay online on IRC even when you log out +- Lets you chat from multiple devices simultaneously ## Add user To add a new user, run this command: -``` -$ lounge add -``` + $ lounge add This will create a new user in your `users/` folder. @@ -31,25 +29,19 @@ _Note: By default, users are stored in the `~/.lounge/users/` folder. You can ch Open the `user.json` for the specified user: -``` -$ lounge edit -``` + $ lounge edit ## Remove user Simply run: -``` -$ lounge remove -``` + $ lounge remove ## List users This command will print a list of all your existing users: -``` -$ lounge list -``` + $ lounge list # User configuration @@ -57,24 +49,22 @@ If you run `lounge edit `, the `user.json` file will open. The user configuration is loaded upon server start. Here's an example of what a `user.json` file might look like: -``` -{ - "user": "example", - "password": "password", - "log": false, - "networks": [{ - "name": "Freenode", - "host": "irc.freenode.net", - "port": 6697, - "tls": true, - "password": "serverpw", - "nick": "john", - "realname": "John Doe", - "commands": [ - "/msg NickServ identify password", - "/msg ChanServ op #chan" - ], - "join": "#foo, #bar" - }] -} -``` + { + "user": "example", + "password": "password", + "log": false, + "networks": [{ + "name": "Freenode", + "host": "irc.freenode.net", + "port": 6697, + "tls": true, + "password": "serverpw", + "nick": "john", + "realname": "John Doe", + "commands": [ + "/msg NickServ identify password", + "/msg ChanServ op #chan" + ], + "join": "#foo, #bar" + }] + } diff --git a/package.json b/package.json new file mode 100644 index 00000000..7650dd4f --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "thelounge.github.io", + "version": "1.0.0", + "description": "The official website for The Lounge", + "scripts": { + "lint": "remark ." + }, + "repository": { + "type": "git", + "url": "git+https://github.com/thelounge/thelounge.github.io.git" + }, + "bugs": { + "url": "https://github.com/thelounge/thelounge.github.io/issues" + }, + "remarkConfig": { + "plugins": [ + "remark-preset-lint-recommended" + ] + }, + "dependencies": { + "remark-cli": "^3.0.0", + "remark-lint": "^6.0.0", + "remark-preset-lint-recommended": "^2.0.0" + } +}