Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
attajak committed Apr 22, 2024
0 parents commit 1bbde77
Show file tree
Hide file tree
Showing 42 changed files with 5,650 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy to GitHub pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "16"
cache: "yarn"
- run: yarn install

- name: Build
env:
BRIDGETOWN_ENV: production
run: bin/bridgetown deploy

- name: Upload build artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./output

deploy:
needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Bridgetown
output
.bridgetown-cache
.bridgetown-metadata
.bridgetown-webpack
.routes.json

# Dependency folders
node_modules
bower_components
vendor

# Caches
.sass-cache
.npm
.node_repl_history

# Ignore bundler config.
/.bundle

# Ignore Byebug command history file.
.byebug_history

# dotenv environment variables file
.env

# Mac files
.DS_Store

# Yarn
yarn-error.log
yarn-debug.log*
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-3.2.2
36 changes: 36 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

####
# Welcome to your project's Gemfile, used by Rubygems & Bundler.
#
# To install a plugin, run:
#
# bundle add new-plugin-name -g bridgetown_plugins
#
# This will ensure the plugin is added to the correct Bundler group.
#
# When you run Bridgetown commands, we recommend using a binstub like so:
#
# bin/bridgetown start (or console, etc.)
#
# This will help ensure the proper Bridgetown version is running.
####

# If you need to upgrade/switch Bridgetown versions, change the line below
# and then run `bundle update bridgetown`
gem "bridgetown", "~> 1.3.4"

# Uncomment to add file-based dynamic routing to your project:
# gem "bridgetown-routes", "~> 1.3.4"

# Puma is the Rack-compatible web server used by Bridgetown
# (you can optionally limit this to the "development" group)
gem "puma", "< 7"

# Uncomment to use the Inspectors API to manipulate the output
# of your HTML or XML resources:
# gem "nokogiri", "~> 1.13"

# Or for faster parsing of HTML-only resources via Inspectors, use Nokolexbor:
# gem "nokolexbor", "~> 0.4"
115 changes: 115 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
GEM
remote: https://rubygems.org/
specs:
activemodel (7.1.3.2)
activesupport (= 7.1.3.2)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
amazing_print (1.6.0)
base64 (0.2.0)
bigdecimal (3.1.7)
bridgetown (1.3.4)
bridgetown-builder (= 1.3.4)
bridgetown-core (= 1.3.4)
bridgetown-paginate (= 1.3.4)
bridgetown-builder (1.3.4)
bridgetown-core (= 1.3.4)
bridgetown-core (1.3.4)
activemodel (>= 6.0, < 8.0)
activesupport (>= 6.0, < 8.0)
addressable (~> 2.4)
amazing_print (~> 1.2)
colorator (~> 1.0)
csv (~> 3.2)
erubi (~> 1.9)
faraday (~> 2.0)
faraday-follow_redirects (~> 0.3)
hash_with_dot_access (~> 1.2)
i18n (~> 1.0)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (>= 5.0, < 5.5)
listen (~> 3.0)
rake (>= 13.0)
roda (~> 3.46)
rouge (>= 3.0, < 5.0)
serbea (~> 1.0)
thor (~> 1.1)
tilt (~> 2.0)
zeitwerk (~> 2.5)
bridgetown-paginate (1.3.4)
bridgetown-core (= 1.3.4)
colorator (1.1.0)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
csv (3.3.0)
drb (2.2.1)
erubi (1.12.0)
faraday (2.9.0)
faraday-net_http (>= 2.0, < 3.2)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.1.0)
net-http
ffi (1.16.3)
hash_with_dot_access (1.2.0)
activesupport (>= 5.0.0, < 8.0)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (5.4.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
minitest (5.22.3)
mutex_m (0.2.0)
net-http (0.4.1)
uri
nio4r (2.7.1)
public_suffix (5.0.5)
puma (6.4.2)
nio4r (~> 2.0)
rack (3.0.10)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
roda (3.79.0)
rack
rouge (4.2.1)
serbea (1.0.1)
activesupport (>= 6.0)
erubi (>= 1.10)
tilt (~> 2.0)
thor (1.3.1)
tilt (2.3.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (0.13.0)
zeitwerk (2.6.13)

PLATFORMS
aarch64-linux-android
ruby
x86_64-linux

DEPENDENCIES
bridgetown (~> 1.3.4)
puma (< 7)

BUNDLED WITH
2.5.9
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Bridgetown Website README

Welcome to your new Bridgetown website! You can update this README file to provide additional context and setup information for yourself or other contributors.

## Table of Contents

- [Prerequisites](#prerequisites)
- [Install](#install)
- [Development](#development)
- [Commands](#commands)
- [Deployment](#deployment)
- [Contributing](#contributing)

## Prerequisites

- [GCC](https://gcc.gnu.org/install/)
- [Make](https://www.gnu.org/software/make/)
- [Ruby](https://www.ruby-lang.org/en/downloads/)
- `>= 2.7`
- [Bridgetown Gem](https://rubygems.org/gems/bridgetown)
- `gem install bridgetown -N`
- [Node](https://nodejs.org)
- `>= 12`
- [Yarn](https://yarnpkg.com)

## Install

```sh
cd bridgetown-site-folder
bundle install && yarn install
```
> Learn more: [Bridgetown Getting Started Documentation](https://www.bridgetownrb.com/docs/).
## Development

To start your site in development mode, run `bin/bridgetown start` and navigate to [localhost:4000](https://localhost:4000/)!

Use a [theme](https://github.com/topics/bridgetown-theme) or add some [plugins](https://www.bridgetownrb.com/plugins/) to get started quickly.

### Commands

```sh
# running locally
bin/bridgetown start

# build & deploy to production
bin/bridgetown deploy

# load the site up within a Ruby console (IRB)
bin/bridgetown console
```

> Learn more: [Bridgetown CLI Documentation](https://www.bridgetownrb.com/docs/command-line-usage)
## Deployment

You can deploy Bridgetown sites on hosts like Render or Vercel as well as traditional web servers by simply building and copying the output folder to your HTML root.

> Read the [Bridgetown Deployment Documentation](https://www.bridgetownrb.com/docs/deployment) for more information.
## Contributing

If repo is on GitHub:

1. Fork it
2. Clone the fork using `git clone` to your local development machine.
3. Create your feature branch (`git checkout -b my-new-feature`)
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create a new Pull Request
49 changes: 49 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
require "bridgetown"

Bridgetown.load_tasks

# Run rake without specifying any command to execute a deploy build by default.
task default: :deploy

#
# Standard set of tasks, which you can customize if you wish:
#
desc "Build the Bridgetown site for deployment"
task :deploy => [:clean, "frontend:build"] do
Bridgetown::Commands::Build.start
end

desc "Build the site in a test environment"
task :test do
ENV["BRIDGETOWN_ENV"] = "test"
Bridgetown::Commands::Build.start
end

desc "Runs the clean command"
task :clean do
Bridgetown::Commands::Clean.start
end

namespace :frontend do
desc "Build the frontend with esbuild for deployment"
task :build do
sh "yarn run esbuild"
end

desc "Watch the frontend with esbuild during development"
task :dev do
sh "yarn run esbuild-dev"
rescue Interrupt
end
end

#
# Add your own Rake tasks here! You can use `environment` as a prerequisite
# in order to write automations or other commands requiring a loaded site.
#
# task :my_task => :environment do
# puts site.root_dir
# automation do
# say_status :rake, "I'm a Rake tast =) #{site.config.url}"
# end
# end
27 changes: 27 additions & 0 deletions bin/bridgetown
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'bridgetown' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("bridgetown-core", "bridgetown")
Loading

0 comments on commit 1bbde77

Please sign in to comment.