Skip to content

Commit

Permalink
Merge pull request #108 from natebass/migrate-to-eleventy
Browse files Browse the repository at this point in the history
Migrate from Jekyll to Eleventy
  • Loading branch information
natebass authored Aug 10, 2023
2 parents 1fe235e + 58ea961 commit f4719cb
Show file tree
Hide file tree
Showing 18 changed files with 2,236 additions and 334 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy Eleventy to GitHub pages

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build Eleventy
run: |
npm install
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _site
branch: gh-pages
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
_site/
.sass-cache/
bower_components/
dist/
node_modules/
build/
*.json
!projects/*.json
gulpfile.js
.jekyll-cache/
.jekyll-metadata

# Ignore folders generated by Bundler
.bundle/
vendor/

# C4S ideas dir
.idea/
Expand Down
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

263 changes: 0 additions & 263 deletions Gemfile.lock

This file was deleted.

36 changes: 3 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,20 @@ codeforsacramento.org

Code for Sacramento is a platform for civic innovation. As an open source organization, you can fork our code including our website. Help us make the site better by [forking it](https://help.github.com/articles/fork-a-repo/), adding new content or features, and [submitting a pull request](https://help.github.com/articles/creating-a-pull-request/)!

### Requirements - via Docker (preferred unless you have issues installing and running docker)
* [Docker](https://docs.docker.com/install/)
* [Git](https://git-scm.com/downloads)
* Text Editor

### Installation - via Docker

#### Clone the Repository
`git clone https://github.com/code4sac/codeforsacramento.org.git`

`cd codeforsacramento.org`

#### Run via docker compose
`docker-compose up`

Keep this tab open and running while you are viewing/editing. Press ctrl + c to exit when you are finished.

`docker-compose build`

If you have previously built the Docker image and are getting an error concerning Ruby packages, try to rebuild the Docker image.

### Requirements - installing on operating system without Docker
* [Ruby 1.9.3 or later](https://www.ruby-lang.org/en/documentation/installation/)
* [Bundler](http://bundler.io/)
* [Git](https://git-scm.com/downloads)
* Text Editor

### Installation

#### Clone the Repository
`git clone https://github.com/code4sac/codeforsacramento.org.git`

#### Install Dependencies
`bundle`

#### Build the Pages
`jekyll build`
`npm install`

#### Serve the Pages
`jekyll serve --watch`
`npm start`

### Hack Away

With `jekyll serve --watch` running, you should be able to access the site on [http://localhost:4000](http://localhost:4000)! Thanks to the `--watch` flag, any changes you make to the markdown (md) files will update automatically!
With `npx @11ty/eleventy --serve` running, you should be able to access the site on [http://localhost:8080](http://localhost:8080)!

For reference, here's an [awesome markdown cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).

Expand Down
2 changes: 1 addition & 1 deletion _includes/home/deprecated.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<h3>From the Blog</h3>

{% include home/blog-excerpt.html %}
{% include "home/blog-excerpt.html" %}

</div><!-- /blog content -->

Expand Down
2 changes: 1 addition & 1 deletion _includes/home/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h1 class="drop-shadow">We are Code for Sacramento</h1>
<p class="drop-shadow">A collective of civic-minded volunteers who contribute their skills toward using the web as a platform for local government and community service.</p>

{% include shared/email_sign_up_form.html %}
{% include "shared/email_sign_up_form.html" %}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _includes/home/main_description.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h4>Catalyzing the Open Data Economy</h4>
<p class="lead">Accessible public data will enable the creation of local tech startups that solve real world problems.</p>
</div>
<div class="col-md-4">
{% include shared/twitter-widget.html %}
{% include "shared/twitter-widget.html" %}
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit f4719cb

Please sign in to comment.