Skip to content

Commit

Permalink
[docs] Point main README to new GH Pages doc site, minor doc README u…
Browse files Browse the repository at this point in the history
…pdates
  • Loading branch information
ericyhwang committed May 30, 2024
1 parent 739264f commit aa73f11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Derby includes a powerful data synchronization engine called Racer that automati

Derby applications load immediately and can be indexed by search engines, because the same templates render on both server and client. In addition, templates define bindings, which instantly update the view when the model changes and vice versa. Derby makes it simple to write applications that load as fast as a search engine, are as interactive as a document editor, and work offline.

See docs here: **http://derbyjs.com/**
See docs here: **https://derbyjs.github.io/derby/**

Main site: **https://derbyjs.com/**

Examples here: **https://github.com/derbyjs/derby-examples**

Expand Down
22 changes: 12 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
These docs are built with Jekyll and served on GitHub Pages.
These docs are built with Jekyll using the [Just the Docs theme](https://just-the-docs.com/).

They are served on GitHub Pages at [https://derbyjs.github.io/derby/](https://derbyjs.github.io/derby/).

# Locally building and viewing docs

Jekyll has a dev server, which will auto-build the docs upon any changes to the source Markdown files. Only changes to `_config.yml` require a dev server restart.
Jekyll has a dev server, which will auto-build the docs upon any changes to the docs' source files. Only changes to `_config.yml` require a dev server restart.

## With local Ruby

Expand All @@ -18,7 +20,7 @@ Run the dev server:
bundle exec jekyll serve
```

The site is viewable at `http://localhost:4000/`.
The site is viewable at `http://localhost:4000/derby/`.

## With Ruby in Docker container

Expand All @@ -28,17 +30,17 @@ One-time container creation:
docker run --name derby-docs-ruby -v "$(pwd)/docs:/derby-docs" -p 127.0.0.1:4000:4000 ruby:2.7 bash -c 'cd derby-docs && bundle install && bundle exec jekyll serve -H 0.0.0.0 -P 4000 --trace'
```

The site is viewable at `http://localhost:4000/`.

Explanation of flags:
* `-v` - Set up a Docker bind mount, mapping the host's `$PWD/docs` directory to a container directory `/derby-docs`.
* `-p` - Map the host's local port 4000 to the container's port 4000, to allow the dev server inside the container to serve requests issued against the host.
* `-H 0.0.0.0 -P 4000` - Have the dev server listen to connections from outside the container. This won't allow connections from outside the host.

Subsequently, to run the dev server:

```
docker start -i derby-docs-ruby
```

Either way, the site is viewable at `http://localhost:4000/derby/`.

Explanation of flags:
* `-v` - Set up a Docker bind mount, mapping the host's `$PWD/docs` directory to a container directory `/derby-docs`.
* `-p` - Map the host's local port 4000 to the container's port 4000, to allow the dev server inside the container to serve requests issued against the host.
* `-H 0.0.0.0 -P 4000` - Have the dev server listen to connections from outside the container. This won't allow connections from outside the host.

To recreate the container with a different command or setup, run `docker rm derby-docs-ruby` to delete the container first.

0 comments on commit aa73f11

Please sign in to comment.