Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into dependabot/bundler/sprockets-4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
itay1313 authored Jul 10, 2022
2 parents 0574999 + 54c32a3 commit e4117d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**This site is maintained by LivePerson’s Developer Experience team. Please contact dx-lp@liveperson.com for issues, comments, or questions.**

This repository generates LivePerson's Developer Center, which can be found at [developers.liveperson.com](https://developers.liveperson.com/). The site is generated using [Jekyll](https://jekyllrb.com/). If you find an issue with the documentation, site structure, meta or anything else, please open an issue and we'll respond as soon as possible.
This repository generates LivePersons Developer Center, which can be found at [developers.liveperson.com](https://developers.liveperson.com/). The site is generated using [Jekyll](https://jekyllrb.com/). If you find an issue with the documentation, site structure, meta or anything else, please open an issue and well respond as soon as possible.

**Table of Contents**

Expand Down Expand Up @@ -42,7 +42,7 @@ E.G documentname: `Add Agent Widgets` should be a folder with name `AddAgentWidg
#### How to Understand the documentsupdated yaml File

Example Normal Layout:

- categoryname: Agent Experience
image: agent-experience-new
documents:
Expand All @@ -62,7 +62,7 @@ Example Normal Layout:
basedomain: https://{domain}/api/account/{accountId}/agentSession
pages:
- pagename: Overview

The Top layer 0 in this structure is the category name Agent Experience. Its folder name is`AgentExperience`.
Add Agent Widgets is a folder in layer 1 with path `AgentExperience/AddAgentWidgets`
The Add Agent Widgets folder only contains one page in it. `AgentExperience/AddAgentWidgets/add-your-own-widgets-to-the-agent-workspace.md`
Expand Down Expand Up @@ -120,7 +120,7 @@ Example Documentname is pagename:
1. Documentname name is `Getting Started with your Free Trial Account` is not a folder name becauase it does not contain a pages key below it
2. Since this above file only contains one parent, there should not be a document name in the file `getting-started-with-your-free-trial-account.md`
3. The pagename for `getting-started-with-your-free-trial-account.md` must match the documentname in the yaml file `Getting Started with your Free Trial Account`
3. The pagename for `getting-started-with-your-free-trial-account.md` must match the documentname in the yaml file `Getting Started with your Free Trial Account`

#### Environments

Expand All @@ -132,15 +132,15 @@ To updated production and staging enviornments, create a pull request for master

#### Updating/Creating Headers

Jekyll uses a [front-matter](https://jekyllrb.com/docs/frontmatter/) to arrange and define the various documents in the site. This is the text which appears in between the “---” at the top of each document. It's technically a YAML snippet, so all [YAML formatting](http://www.yamllint.com/) and rules apply to it. Our headers are usually comprised of the following key/value pairs:
Jekyll uses a [front-matter](https://jekyllrb.com/docs/frontmatter/) to arrange and define the various documents in the site. This is the text which appears in between the “---” at the top of each document. Its technically a YAML snippet, so all [YAML formatting](http://www.yamllint.com/) and rules apply to it. Our headers are usually comprised of the following key/value pairs:

* `pagename`: This is the name of the page that will appear at the top of the document.

* `keywords`: This replaces the keywords found in the `<meta>` tag of the page. Leave it unpopulated.

* `sitesection`: This key accepts either `Documents` or `Solutions`. This designates which part of the site the document is under.

* `categoryname`: This is the category to which the document's API belongs (for example, the “Create Users” method belongs to the Users API which is under Contact Center Management).
* `categoryname`: This is the category to which the documents API belongs (for example, the “Create Users” method belongs to the Users API which is under Contact Center Management).

* `documentname`: This is the API to which the document belongs.

Expand All @@ -160,32 +160,32 @@ Jekyll uses a [front-matter](https://jekyllrb.com/docs/frontmatter/) to arrange

* Add the Files to the Hidden->Hidden folder.
* Do not include them to documentsupdated.yaml file.
* Make sure Layout header is set to `hidden-layout` (This specifically makes it so search engines can't find it)
* Make sure Layout header is set to `hidden-layout` (This specifically makes it so search engines cant find it)
* Make sure that the headers are set correctly follow the file header structure of `blank.md` in the Hidden->Hidden folder

**Any other parameters which are not documented here which you might find in the front-matter are deprecated and are only present for backwards compatibility purposes. These should not be used**.

#### Adding New Documents to the Sidebar

Once you've created a new document, you'll need to have it manually added. We chose a manual process for the sidebar for a few reasons. First, it reduces the fragility of the sidebar (the extra, manual step gives us another layer of QA). Secondly, it increases the flexibility of the sidebar (we write code once and then maintain a YAML file, making it easier to add options). Lastly, it decreases site build times (since the `forloops` needed to dynamically build a sidebar in a site of our size and complexity are time and resource consuming).
Once youve created a new document, youll need to have it manually added. We chose a manual process for the sidebar for a few reasons. First, it reduces the fragility of the sidebar (the extra, manual step gives us another layer of QA). Secondly, it increases the flexibility of the sidebar (we write code once and then maintain a YAML file, making it easier to add options). Lastly, it decreases site build times (since the `forloops` needed to dynamically build a sidebar in a site of our size and complexity are time and resource consuming).

The sidebar's YAML file can be found in the `_data` folder. It's called `documentsupdated.yaml`. You **must** make sure the name of the file and the pagename in the sidebar correspond; the link the sidebar sends to is auto-generated and **must** match the `permalink` in the file's header (see above). Please make sure the Markdown file created contains its pagename, documentname, categoryname, and permalink in its header. The Markdown file might need more information depending on where it will need to be in the sidebar.
The sidebars YAML file can be found in the `_data` folder. Its called `documentsupdated.yaml`. You **must** make sure the name of the file and the pagename in the sidebar correspond; the link the sidebar sends to is auto-generated and **must** match the `permalink` in the files header (see above). Please make sure the Markdown file created contains its pagename, documentname, categoryname, and permalink in its header. The Markdown file might need more information depending on where it will need to be in the sidebar.

The max width for an image in this repo is 800px.

### Building the Site Locally

**IMPORTANT:** This repository requires Ruby 2.7.x. Attempts to run the local server on 3.x.x will generate confusing errors.

If you have not already done so, make sure your computer has Ruby installed. Here's a helpful guide on how best do that on [Mac](http://railsapps.github.io/installrubyonrails-mac.html) (you can stop once Ruby is installed, you don't need Rails) and on [any other system](https://www.ruby-lang.org/en/documentation/installation/).
If you have not already done so, make sure your computer has Ruby installed. Heres a helpful guide on how best do that on [Mac](http://railsapps.github.io/installrubyonrails-mac.html) (you can stop once Ruby is installed, as you dont need Rails) and on [any other system](https://www.ruby-lang.org/en/documentation/installation/). Another good resource is [Jekyll’s installation guide](https://jekyllrb.com/docs/installation/macos/), with the only difference being to have `chruby` point to a different version of Ruby (like 2.7.6).

Once you have installed Ruby, clone this repository to your machine. Once done, navigate to it using Terminal or your preferred command line interface. Follow the steps below to run the site from your machine. **If you're on Windows, don't forget to run your CLI as an admin.**
Once you have installed Ruby, clone this repository to your machine. Once done, navigate to it using Terminal or your preferred command line interface. Follow the steps below to run the site from your machine. **If youre on Windows, dont forget to run your CLI as an admin.**

**First time install**

1. Run `npm install`
2. Run `npm run serve`
3. Navigate to http://localhost:4000/ (or the port you chose) and you'll see the site.
3. Navigate to http://localhost:4000/ (or the port you chose) and youll see the site.

**OSX Installation**

Expand All @@ -196,9 +196,9 @@ Once you have installed Ruby, clone this repository to your machine. Once done,

You have two options to run the site locally after the first install:

* **Using gulp.js**. [Gulp](https://gulpjs.com/) is a toolkit for automating painful or time-consuming tasks. By simply typing in `gulp` in your command line, it takes care of all the build commands needed to serve the site. It also watches the root directory and will automatically refresh your browser once any changes were built. Gulp and its dependencies are installed locally in the project, so there's no further installation needed from your end.
* **Using gulp.js**. [Gulp](https://gulpjs.com/) is a toolkit for automating painful or time-consuming tasks. By simply typing in `gulp` in your command line, it takes care of all the build commands needed to serve the site. It also watches the root directory and will automatically refresh your browser once any changes were built. Gulp and its dependencies are installed locally in the project, so theres no further installation needed from your end.

* **Using Jekyll's standard commands**. All you need to run in consequent builds of the site is `bundle exec jekyll serve`. You can add the suffix `--incremental` to enable incremental building of the site. This saves build times since the regeneration feature is enabled by default (the site rebuilds every time you hit “save”). When `--incremental` is used, Jekyll won't rebuild the entire site on every save, only the affected sections. If you'd like the project to automatically open in a new tab, you can add the `-o` flag to the end of the above command.
* **Using Jekylls standard commands**. All you need to run in consequent builds of the site is `bundle exec jekyll serve`. You can add the suffix `--incremental` to enable incremental building of the site. This saves build times since the regeneration feature is enabled by default (the site rebuilds every time you hit “save”). When `--incremental` is used, Jekyll wont rebuild the entire site on every save, only the affected sections. If youd like the project to automatically open in a new tab, you can add the `-o` flag to the end of the above command.

**Note**: changes that alter site navigation or other changes that change the site as a whole might not show up when using `--incremental`. If that occurs, simply “kill” the build and run `bundle exec jekyll serve` without the suffix. **This is also true for gulp: you will need to kill your gulp instance and then run the direct Jekyll command**.

Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e4117d7

Please sign in to comment.