|
1 | 1 | # GeoBlacklight Quick Start |
| 2 | + |
2 | 3 | This guide covers the quickest way to get up and running with GeoBlacklight, including: |
3 | 4 |
|
4 | | - - How to install GeoBlacklight on your local computer. |
5 | | - - How to create a new application. |
6 | | - - How to add and index geospatial content. |
| 5 | +- How to create a new application. |
| 6 | +- How to add and index geospatial content. |
| 7 | + |
| 8 | +!!! warning "Required dependencies" |
| 9 | + Before getting started, make sure you have installed the [required dependencies listed on the Developers page](../developers#dependencies). You will also need the Ruby on Rails CLI installed for the `rails new` command: |
| 10 | + |
| 11 | + ```bash |
| 12 | + gem install rails |
| 13 | + ``` |
7 | 14 |
|
8 | | -## Installation |
| 15 | +## Creating a new GeoBlacklight application |
9 | 16 |
|
10 | | - Bootstrap a new GeoBlacklight Ruby on Rails application using the template script: |
| 17 | +Bootstrap a new GeoBlacklight application using the template script, replacing `app-name` with the name of your new application: |
11 | 18 |
|
12 | 19 | ```bash |
13 | | -DISABLE_SPRING=1 rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/v4.4.1/template.rb |
| 20 | +rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/template.rb -a propshaft --css bootstrap --js rollup |
14 | 21 | ``` |
15 | | - Then run the `geoblacklight:server` rake task to run the application: |
| 22 | + |
| 23 | +Then run the `geoblacklight:server` rake task to run the application: |
16 | 24 |
|
17 | 25 | ```bash |
18 | | -$ cd app-name |
19 | | -$ bundle exec rake geoblacklight:server |
| 26 | +cd app-name # replace with your app's name |
| 27 | +bundle exec rake geoblacklight:server |
20 | 28 | ``` |
21 | 29 |
|
22 | | -* Visit your GeoBlacklight application at: [http://localhost:3000](http://localhost:3000) |
23 | | -* Visit the Solr admin panel at: [http://localhost:8983/solr/#/blacklight-core](http://localhost:8983/solr/#/blacklight-core) |
| 30 | +- Visit your GeoBlacklight application at: [http://localhost:3000](http://localhost:3000) |
| 31 | +- Visit the Solr admin panel at: [http://localhost:8983/solr/#/blacklight-core](http://localhost:8983/solr/#/blacklight-core) |
| 32 | + |
| 33 | +!!! info "Using importmaps for JavaScript" |
| 34 | + |
| 35 | + The default GeoBlacklight template uses [Vite](https://vite-ruby.netlify.app/guide/rails.html) to bundle the application's JavaScript. If you would prefer to use Rails's default of [importmaps](https://github.com/rails/importmap-rails), you can set `--js importmap` when generating your application: |
| 36 | + |
| 37 | + ```bash |
| 38 | + rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/template.rb -a propshaft --css bootstrap --js importmap |
| 39 | + ``` |
24 | 40 |
|
25 | 41 | ## Index Example Data |
26 | 42 |
|
27 | 43 | With your Solr server and Rails server already running (via the `geoblacklight:server` rake task above), open a new terminal window and index the GeoBlacklight project's test fixtures via: |
28 | 44 |
|
29 | 45 | ```bash |
30 | | -$ bundle exec rake "geoblacklight:index:seed[:remote]" |
| 46 | +bundle exec rake "geoblacklight:index:seed[:remote]" |
31 | 47 | ``` |
0 commit comments