Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzupkoii committed Sep 18, 2024
2 parents 66e2f20 + 7aa6181 commit 1dcebd1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Base image: Ruby with necessary dependencies for Jekyll
FROM ruby:3.2

# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
nodejs \
&& rm -rf /var/lib/apt/lists/*

# Set the working directory inside the container
WORKDIR /usr/src/app

# Copy Gemfile and Gemfile.lock into the container (necessary for `bundle install`)
COPY Gemfile Gemfile.lock ./

# Install bundler and dependencies
RUN gem install bundler:2.3.26 && bundle install

# Expose port 4000 for Jekyll server
EXPOSE 4000

# Command to serve the Jekyll site
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0", "--watch"]

17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

See more info at https://academicpages.github.io/

## Running Locally
## Running locally

When you are initially working your website, it is very useful to be able to preview the changes locally before pushing them to GitHub. To work locally you will need to:

Expand All @@ -35,6 +35,21 @@ When you are initially working your website, it is very useful to be able to pre

If you are running on Linux it may be necessary to install some additional dependencies prior to being able to run locally: `sudo apt install build-essential gcc make`

## Using Docker

Working from a different OS, or just want to avoid installing dependencies? You can use the provided `Dockerfile` to build a container that will run the site for you if you have [Docker](https://www.docker.com/) installed.

Start by build the container:

```bash
docker build -t jekyll-site .
```

Next, run the container:
```bash
docker run -p 4000:4000 --rm -v $(pwd):/usr/src/app jekyll-site
```

# Maintenance

Bug reports and feature requests to the template should be [submitted via GitHub](https://github.com/academicpages/academicpages.github.io/issues/new/choose). For questions concerning how to style the template, please feel free to start a [new discussion on GitHub](https://github.com/academicpages/academicpages.github.io/discussions).
Expand Down
2 changes: 2 additions & 0 deletions _includes/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ <h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_labe
{% endif %}
</section>
{% when "custom" %}
<h4 class="page__comments-title">{{ comments_label }}</h4>
<section id="comments"></section>
{% include /comments-providers/scripts.html %}
{% endcase %}
</div>
1 change: 0 additions & 1 deletion _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<script src="{{ base_path }}/assets/js/main.min.js"></script>

{% include analytics.html %}
{% include /comments-providers/scripts.html %}

0 comments on commit 1dcebd1

Please sign in to comment.