Skip to content

Commit

Permalink
Migrate to bridgetownrb (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
thimy authored Sep 29, 2023
1 parent 2f625f3 commit c87932a
Show file tree
Hide file tree
Showing 396 changed files with 6,068 additions and 9,301 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/test.yml

This file was deleted.

47 changes: 30 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
# Dependencies
/node_modules
# Bridgetown
output
.bridgetown-cache
.bridgetown-metadata
.bridgetown-webpack
.routes.json

# Dependency folders
node_modules
bower_components
vendor

# Caches
.sass-cache
.npm
.node_repl_history

# Production
/build
# Ignore bundler config.
/.bundle

# Generated files
.docusaurus
.cache-loader
# Ignore Byebug command history file.
.byebug_history

# Misc
# dotenv environment variables file
.env

# Mac files
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
# Yarn
yarn-error.log
yarn-debug.log*
yarn-error.log*

.bridgetown-cache
output
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
43 changes: 43 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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.0"

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

# 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"

gem "bridgetown-lit-renderer", "= 2.1.0.beta2"

gem "bridgetown-quick-search", "~> 2.0"
gem "bridgetown-svg-inliner", "~> 2.0"

gem "bridgetown-sitemap", "~> 2.0"
117 changes: 117 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
GEM
remote: https://rubygems.org/
specs:
activemodel (7.0.7)
activesupport (= 7.0.7)
activesupport (7.0.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
amazing_print (1.5.0)
bridgetown (1.3.0)
bridgetown-builder (= 1.3.0)
bridgetown-core (= 1.3.0)
bridgetown-paginate (= 1.3.0)
bridgetown-builder (1.3.0)
bridgetown-core (= 1.3.0)
bridgetown-core (1.3.0)
activemodel (>= 6.0, < 8.0)
activesupport (>= 6.0, < 8.0)
addressable (~> 2.4)
amazing_print (~> 1.2)
colorator (~> 1.0)
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)
listen (~> 3.0)
rake (>= 13.0)
roda (~> 3.46)
rouge (~> 3.0)
serbea (~> 1.0)
thor (~> 1.1)
tilt (~> 2.0)
zeitwerk (~> 2.5)
bridgetown-lit-renderer (2.1.0.beta2)
bridgetown (>= 1.3.0.beta2, < 2.0)
random-port (>= 0.5)
bridgetown-paginate (1.3.0)
bridgetown-core (= 1.3.0)
bridgetown-quick-search (2.0.0)
bridgetown (>= 1.2.0.beta2, < 2.0)
bridgetown-sitemap (2.0.2)
bridgetown (>= 1.2.0, < 2.0)
bridgetown-svg-inliner (2.0.0)
bridgetown (>= 1.2.0, < 2.0)
nokogiri
colorator (1.1.0)
concurrent-ruby (1.2.2)
erubi (1.12.0)
faraday (2.7.10)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.0.2)
ffi (1.15.5)
hash_with_dot_access (1.2.0)
activesupport (>= 5.0.0, < 8.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (5.4.0)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
minitest (5.19.0)
nio4r (2.5.9)
nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
public_suffix (5.0.3)
puma (6.3.1)
nio4r (~> 2.0)
racc (1.7.1)
rack (3.0.8)
rake (13.0.6)
random-port (0.6.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
roda (3.71.0)
rack
rouge (3.30.0)
ruby2_keywords (0.0.5)
serbea (1.0.1)
activesupport (>= 6.0)
erubi (>= 1.10)
tilt (~> 2.0)
thor (1.2.2)
tilt (2.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
zeitwerk (2.6.11)

PLATFORMS
x86_64-darwin-22

DEPENDENCIES
bridgetown (~> 1.3.0)
bridgetown-lit-renderer (= 2.1.0.beta2)
bridgetown-quick-search (~> 2.0)
bridgetown-sitemap (~> 2.0)
bridgetown-svg-inliner (~> 2.0)
puma (< 7)

BUNDLED WITH
2.4.10
77 changes: 53 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,70 @@
# Website
# Bridgetown Website README

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
Welcome to your new Bridgetown website! You can update this README file to provide additional context and setup information for yourself or other contributors.

### Installation
## Table of Contents

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

### Local Development
## 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
```
$ yarn start
```
> Learn more: [Bridgetown Getting Started Documentation](https://www.bridgetownrb.com/docs/).
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
## Development

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

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

This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Commands

### Deployment
```sh
# running locally
bin/bridgetown start

Using SSH:
# build & deploy to production
bin/bridgetown deploy

```
$ USE_SSH=true yarn deploy
# load the site up within a Ruby console (IRB)
bin/bridgetown console
```

Not using SSH:
> Learn more: [Bridgetown CLI Documentation](https://www.bridgetownrb.com/docs/command-line-usage)
```
$ GIT_USER=<Your GitHub username> yarn deploy
```
## 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:

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
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
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

Loading

0 comments on commit c87932a

Please sign in to comment.