Skip to content

nwspk/web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3d6efcb · Feb 19, 2025
Jan 11, 2023
Feb 19, 2025
Jan 7, 2023
Nov 15, 2024
Dec 8, 2022
Dec 25, 2022
Apr 16, 2015
Jun 15, 2022
Dec 25, 2022
Jan 16, 2023
Jan 7, 2023
Dec 9, 2022
Jul 18, 2022
Jan 16, 2023
Jan 7, 2023
May 30, 2016
Jan 8, 2023
Feb 19, 2016
Dec 8, 2022
May 21, 2024
Jul 25, 2023
Jan 7, 2023
Dec 25, 2022
Sep 18, 2023
Aug 27, 2016
Jan 11, 2023
Jan 16, 2023
Jun 14, 2022
Jan 7, 2023
Jun 14, 2022

Repository files navigation

newspeak.house

Static content

We have auto-deployment through GitHub Actions from this repository, so we can make changes to the website directly from here.

  • master branch deploys to production
  • staging branch deploys to the staging environment

Texts

To change texts:

  1. Locate view in the views directory
  2. Say, one wants to change the text under the "News" section. Locate that in the index.html.haml file:
%h2 News
%p
  Lorem ipsum dolor sit amet consectetur, adipisicing elit. Maiores quo cupiditate iste labore fugiat beatae illum corporis incidunt exercitationem magni. Enim error, id at nam mollitia dolores odit nostrum animi.
  1. Change it into:
%h2 News
%p
  We have survived the pandemic.

Images

To add images:

  1. Upload new image file in /app/assets/images/.
  2. Figure out which one is the page/view in the views directory that will display the new image.
  3. Add an image tag like below. NB, the image tag should be on its own line:
= image_tag('book-logo-black-2.png')

Add new page

To add a new page, say newspeak.house/newproject, one needs to:

  1. Create the new file in /app/views/home/. Say /app/views/home/newproject.html.haml
  2. Add a route entry in /config/routes.rb for the home controller. At the top the routes.rb file:
get 'api/events',               to: 'api#events'
get 'about',                    to: 'home#about', as: :about
get 'fellowship',               to: 'home#fellowship', as: :fellowship
post 'webhooks',                to: 'webhooks#index'

Add a new line just under the last home controller line (the fellowship one in our example). The new line will look like so:

get 'newproject',               to: 'home#newproject', as: :newproject

Styling

The main CSS styling file is /app/assets/stylesheets/application.css.

Development

With Docker

Using Docker:

docker compose up --build

Set up database:

docker compose exec web bundle exec rake db:setup db:migrate

Without Docker

Prerequisites:

  • rbenv
  • ruby 3.1.3
bundle install
rails server
redis-server &
sidekiq -e development -q default -q mailers

Deployment

Check out the Server Playbook document.