Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 23 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,19 @@ Follow these instructions to set up and run the website locally using Docker.
cd SECQUOIA.github.io
```

2. **Create a Dockerfile**

Create a file named `Dockerfile` with the following content:

```dockerfile
FROM ruby:3.2
WORKDIR /app
COPY . .
RUN gem install bundler && bundle install
EXPOSE 4000
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"]
```

3. **Create a Gemfile**

Create a file named `Gemfile` with the following content:

```ruby
source "https://rubygems.org"

gem "jekyll", "~> 4.0.0"
gem "mercenary", "~> 0.3.6"
gem "webrick"
gem "forty_jekyll_theme", path: "."
```

4. **Build the Docker image**
2. **Build the Docker image**

```bash
docker build -t secquoia-website .
```

5. **Run the website locally**
3. **Run the website locally**

```bash
docker run -p 4000:4000 -v "$(pwd)":/app secquoia-website
docker run --rm -it -p 4000:4000 -v "$(pwd)":/app secquoia-website
```

6. **View the website**
4. **View the website**

Open your web browser and go to [http://localhost:4000](http://localhost:4000)

Expand All @@ -74,19 +48,36 @@ When making changes to the website:
To enable live reloading, stop any running containers and run:

```bash
docker run -p 4000:4000 -v "$(pwd)":/app jekyll-site bundle exec jekyll serve --livereload --host 0.0.0.0
docker run --rm -it -p 4000:4000 -v "$(pwd)":/app secquoia-website bundle exec jekyll serve --livereload --host 0.0.0.0
```

### Building for Production

To build the site for production:

```bash
docker run -v "$(pwd)":/app jekyll-site bundle exec jekyll build
docker run --rm -v "$(pwd)":/app secquoia-website bundle exec jekyll build
```

The built site will be in the `_site` directory, which can be deployed to any static hosting service.

### Native Ruby (Optional)

If you prefer not to use Docker:

```bash
bundle install
bundle exec jekyll serve --livereload
```

### Validation

Run the repository validation script before opening a PR:

```bash
./validate.sh
```

### Troubleshooting

- If you encounter permission issues with Docker, ensure your user is added to the Docker group:
Expand All @@ -100,10 +91,6 @@ The built site will be in the `_site` directory, which can be deployed to any st
docker build --no-cache -t secquoia-website .
```

### Important Note

The Dockerfile, Gemfile, and other development configuration files are gitignored to keep the repository clean. You'll need to recreate them when setting up a new development environment.

## Image Policy (WebP Usage)

We store original images (PNG/JPG/etc.) in the repository for provenance, but **only WebP images should be referenced in the built site**.
Expand Down
Loading