You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/geoblacklight_quick_start.md
+24-11Lines changed: 24 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,30 +14,43 @@ This guide covers the quickest way to get up and running with GeoBlacklight, inc
14
14
15
15
## Creating a new GeoBlacklight application
16
16
17
-
Bootstrap a new GeoBlacklight application using the template script, replacing `app-name` with the name of your new application:
17
+
To create a new application, you can use the `template.rb` file. The options provided at the time you invoke `rails new` depend on your asset management choices.
18
+
19
+
!!! warning "Choosing an asset pipeline"
20
+
It's not trivial to switch your app from one asset strategy to another after creation, so choose based on your needs. For more information on using a bundler vs. importmaps, check out the [Rails docs on choosing an asset pipeline](https://guides.rubyonrails.org/working_with_javascript_in_rails.html#choosing-between-import-maps-and-a-javascript-bundler).
21
+
22
+
### Using Vite for assets
23
+
24
+
This approach uses [vite-rails](https://vite-ruby.netlify.app/guide/rails.html) to bundle all of the app's javascript and styles. Presuming you want your app to be in a directory `app-name`, you initialize a new app with:
25
+
26
+
```
27
+
ASSET_PIPELINE=vite rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/template.rb -a propshaft --css bootstrap --js rollup
28
+
```
29
+
30
+
### Using importmaps and dartsass-rails for assets
31
+
32
+
This approach uses Rails's default of [import maps](https://guides.rubyonrails.org/working_with_javascript_in_rails.html#import-maps) for javascript and dart sass for compiling SCSS.
33
+
34
+
Presuming you want your app to be in a directory `app-name`, you initialize a new app with:
18
35
19
36
```bash
20
-
rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/template.rb -a propshaft --css bootstrap --js rollup
37
+
ASSET_PIPELINE=importmap rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/template.rb -a propshaft --css bootstrap --js importmap
21
38
```
22
39
23
-
Then run the `geoblacklight:server` rake task to run the application:
40
+
## Running the application
41
+
42
+
You can run the `geoblacklight:server` rake task to run the application:
24
43
25
44
```bash
26
45
cd app-name # replace with your app's name
27
46
bundle exec rake geoblacklight:server
28
47
```
29
48
49
+
This will also spin up a solr instance for you via Docker and seed it with example fixture data.
50
+
30
51
- Visit your GeoBlacklight application at: [http://localhost:3000](http://localhost:3000)
31
52
- Visit the Solr admin panel at: [http://localhost:8983/solr/#/blacklight-core](http://localhost:8983/solr/#/blacklight-core)
32
53
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
-
```
40
-
41
54
## Index Example Data
42
55
43
56
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:
0 commit comments