in development, geek stuff, linux

Customising Blacklight

I’m doing my own customisation so, I will try to do a step-by-step with loads of comments so I can do it again if something goes wrong (or if I had to repeat in x months time…)


To change the initial text that comes with Blacklight on home page:

  • make folder ‘catalog’ inside /blacklight-app/app/views/
  • copy _home_text.html.erb from /blacklight-app/vendor/plugins/blacklight/app/views/catalog to this new catalog folder you just created
  • edit the file copy _home_text.html.erb with your text
  • logos/images can be found at /blacklight-app/public/plugin_assets/blacklight/images
  • stylesheet is atm /blacklight-app/public/plugin_assets/blacklight/stylesheets

If you are using multicore, change the default solr address to http://localhost:8983/solr/YOURMAINCORE in the file /blacklight-app/config/solr.yml

To change what is being show after a search, check the file that is at: /blacklight-app/config/initializers/blacklight_config.rb

To customise css and js, on /blacklight-app/app/controllers/application_controller.rb add:

ApplicationController.before_filter do |controller|
    controller.stylesheet_links << "my_css.css"

And put the stylesheet my_css.css in your own app’s public/stylesheets/my_css.css.

Check: css tinkering

Write a Comment