Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8fff55d

Browse files
authoredMar 17, 2023
Local dev (#64)
* Added `bpkg.json` for quick command reference. * Added Docker for local development environment: - Added `docker-compose.yml` with `jekyll/jekyll` image - Updated `_config.yml` exclude to include compose file - Updated `bpkg.json` to include docker commands - Updated `README.md` to provide Docker Environment section * Added Jekyll minimal theme to Docker image. - Added `Dockerfile` with `gem install` for required Jekyll theme - Updated `docker-compose.yml` to use new `Dockerfile` - Updated `_config.yml` exclude to include `dev` directory * Fixed failed Jekyll build: - Updated `Dockerfile` to add `webrick` install - Remove `nil` valued layout from `atom.xml` and `rss.xml` * Added `bpkg` to Docker image: - Updated `Dockerfile` to install `bpkg` and dependencies - Updated `bpkg.json` to include commands for Docker `bpkg` * Added `bpkg` Rake commands. * Correct Docker environment: - Update `bpkg.json` command `docker` to expose service ports - Update `Dockerfile` installation of `curl` removing virtual option
1 parent eb1a228 commit 8fff55d

File tree

8 files changed

+106
-12
lines changed

8 files changed

+106
-12
lines changed
 

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
_site/*
55
_theme_packages/*
6+
.jekyll-cache/*
67

78
Thumbs.db
89
.DS_Store

‎README.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,36 @@
33
`bpkg` is a lightweight bash package manager.
44
This repository contains the source code of it's homepage.
55

6-
## Links:
6+
## Links
77

88
* [`bpkg` homepage][home];
99
* [`bpkg` source code on GitHub][hub];
1010
* [`bpkg` organization on GitHub][org];
1111

12+
## `bpkg` Commands
13+
14+
To assist in working with this project, A `bpkg.json` file has been included with commonly used project commands. The provided commands can be executed using the following format:
15+
16+
```bash
17+
$ bpkg run [COMMAND]
18+
```
19+
20+
In the remainder of this document, if there is a accompanying `bpkg` _command_ it will be listed as follows:
21+
22+
> **BPKG:** `[COMMAND]`
23+
24+
## Docker Environment
25+
26+
This environment is not necessary to use if you'd rather run everything directly on your host system. This environment is provided however, to facilitate all the required components for building and development of `bpkg` site. There are associated `bpkg` commands to interact with the Docker environment.
27+
1228
## Dependencies
1329

1430
This website was made with the [Jekyll][jekyll] engine, so it depends on a few
1531
Ruby Gems. To install them, run the following command.
1632

17-
$ gem install jekyll
33+
```bash
34+
$ gem install jekyll
35+
```
1836

1937
It might take a while to finish, but once it does you're ready to go.
2038

@@ -28,19 +46,29 @@ of possible commands (thanks to [this great quickstart on Jekyll][tuto]):
2846

2947
---
3048

31-
$ rake preview
49+
```bash
50+
$ rake preview
51+
```
52+
53+
> **BPKG:** `preview`<br />
54+
> **BPKG:** `docker-preview`
3255
3356
Builds the entire site to a local folder `_site` and launches a webserver to
3457
preview it.
3558

36-
To see the full site, point your browser to `localhost:40000`.
59+
To see the full site, point your browser to `localhost:4000`.
3760

3861
If you make any changes on any files, it will regenerate the website
3962
automatically.
4063

4164
---
4265

43-
$ rake post title="Hello, World!"
66+
```bash
67+
$ rake post title="Hello, World!"
68+
```
69+
70+
> **BPKG:** `post title="Hello, World!"`<br />
71+
> **BPKG:** `docker-post title="Hello, World!"`
4472
4573
Creates a new post. It will create a file `_posts/YYYY-MM-DD-title.md`, where
4674
the date is the current, by default.
@@ -50,11 +78,21 @@ site.
5078

5179
---
5280

53-
$ rake page name="about"
81+
```bash
82+
$ rake page name="about"
83+
```
84+
85+
> **BPKG:** `page name="about"`<br />
86+
> **BPKG:** `docker-page name="about"`
5487
5588
Creates a new page. It will create the file `./about/index.html`.
5689

57-
$ rake page name="about.html"
90+
```bash
91+
$ rake page name="about.html"
92+
```
93+
94+
> **BPKG:** `page name="about.html"`<br />
95+
> **BPKG:** `docker-page name="about.html"`
5896
5997
Alternative way to create a new page, on this case it will be `./about.html`.
6098

@@ -78,9 +116,8 @@ This site uses [Jekyll Bootstrap][boots] with a heavily customized version of
78116
[org]: https://github.com/bpkg
79117
[jekyll]: http://jekyllrb.com/
80118
[tuto]: http://jekyllbootstrap.com/usage/jekyll-quick-start.html
119+
[posts]: http://jekyllrb.com/docs/posts/
81120
[intro]: http://jekyllbootstrap.com/lessons/jekyll-introduction.html
82121
[boots]: http://jekyllbootstrap.com/
83122
[theme]: https://github.com/jekyllbootstrap/theme-the-program
84123
[saito]: http://css.studiomohawk.com/
85-
[posts]: http://jekyllrb.com/docs/posts/
86-

‎_config.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ highlighter : rouge # code highlighter
3939
# For more see: http://jekyllrb.com/docs/permalinks/
4040
permalink: /pkg/:title
4141

42-
exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"]
42+
exclude: [
43+
".rbenv-version",
44+
".rvmrc",
45+
"bpkg.json",
46+
"changelog.md",
47+
"dev/",
48+
"docker-compose.yml",
49+
"Rakefile",
50+
"README.md"
51+
]
4352

4453
# The production_url is only used when full-domain names are needed
4554
# such as sitemap.txt

‎bpkg.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "bpkg/bpkg.github.io",
3+
"description": "Homepage for the bpkg project ",
4+
"commands": {
5+
"create": "mkdir .jekyll-cache; mkdir _site",
6+
"build": "jekyll build $@",
7+
"clean": "rm -Rf .jekyll-cache/* _site/*",
8+
"preview": "rake preview",
9+
"post": "rake post $@",
10+
"page": "rake page $@",
11+
12+
"docker": "docker-compose run --rm --service-ports jekyll $@",
13+
14+
"docker-shell": "bpkg run docker /bin/bash",
15+
"docker-jekyll": "bpkg run docker jekyll $@",
16+
"docker-rake": "bpkg run docker rake $@",
17+
"docker-bpkg": "bpkg run docker bpkg $@",
18+
19+
"docker-build": "bpkg run docker-jekyll build $@",
20+
"docker-clean": "bpkg run docker-bpkg run clean",
21+
"docker-preview": "bpkg run docker-rake preview",
22+
"docker-post": "bpkg run docker-rake post $@",
23+
"docker-page": "bpkg run docker-rake page $@"
24+
}
25+
}

‎dev/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM jekyll/jekyll:latest
2+
3+
RUN gem install \
4+
webrick \
5+
jekyll-theme-minimal
6+
7+
RUN apk add --no-cache \
8+
curl
9+
10+
RUN wget -O - get.bpkg.sh | bash
11+
12+
CMD []

‎docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: "3"
2+
3+
services:
4+
jekyll:
5+
build:
6+
context: ./dev/
7+
volumes:
8+
- ./:/srv/jekyll:Z
9+
ports:
10+
- "4000:4000"
11+
stdin_open: true
12+
tty: true

‎feed/atom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
layout: nil
32
title : Atom Feed
43
---
54
<?xml version="1.0" encoding="utf-8"?>

‎feed/rss.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
layout: nil
32
title : RSS Feed
43
---
54

0 commit comments

Comments
 (0)