A simple static index for known ROS packages hosted at http://index.ros.org/.
It builds in jekyll with a plugin to clone repositories containing ROS packages, scrapes them for information, and uses client-side javascript for quick searching and visualization.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get install curl git git-svn mercurial nodejs pandoc python3-vcstool
curl -L https://get.rvm.io | bash -s stable
# if this fails, add the PGP key and run again
source ~/.rvm/scripts/rvm
rvm requirements
rvm install ruby
rvm rubygems current
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
gem install bundler
git clone [email protected]:ros-infrastructure/rosindex.git --recursive
cd rosindex
bundle install
Run:
make build
By default, site will be written to _site. This behavior can be overriden as follows:
make build site_path=/path/to/site
See https://docs.docker.com/install/linux/ for details on docker installation.
docker/build.sh
Run:
docker/run.sh
make build # once inside the container
Or the following can be used as a shorthand:
docker/run.sh build_site
The build process entails four long-running steps:
- Generating the list of repositories
- Cloning / Updating the known repositories
- Scraping the repositories
- Generating the static pages
- Generating the lunr search index
Each of the first three steps can be skipped in order to save time when
experimenting with different parts of the pipeline with the following flags in
_config.yml
:
# If true, this skips finding repos based on the repo sources
skip_discover: false
# If true, this skips updating the known repos
skip_update: false
# If true, this skips scraping the cloned repos
skip_scrape: false
# If true, this skips generating the search index
skip_search_index: false
Additionally, some make targets are provided for convenience:
-
To skip everything but repo discovering:
make discover
-
To skip everything but repo updates:
make update
-
To skip everything but repo scraping:
make scrape
-
To skip everything but a search index build:
make search-index
Note that skipping parts of the rosindex build does not interfere with Jekyll's build process (e.g. generated files are still written to site).
Run:
make serve-devel
The following can be used as a shorthand if using docker containers:
docker/run.sh test_site
Run:
make serve
Note: This requires a minimum of 30GB of free space for the
checkout
directory.
Deployment is not managed by these tools. It is to be managed externally e.g. using a local repository as site destination.
ROSIndex qualifies as independent documentation of 'external_site' type. Therefore, it can readily be built and deployed as Github Pages by a doc_independent job.