Skip to content

Commit

Permalink
Bootstrap documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
b-viguier committed Aug 24, 2024
1 parent 437d2b7 commit b4eb036
Show file tree
Hide file tree
Showing 11 changed files with 220 additions and 7 deletions.
24 changes: 20 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,49 @@ DOCKER_COMPOSE = docker compose -f $(DIR)/docker/docker-compose.yaml -p $(PROJEC

build: ## Build the docker containers
$(DOCKER_COMPOSE) build
.PHONE: build
.PHONY: build

build-jekyll: ## Build the Jekyll container only (useful to update dependencies)
$(DOCKER_COMPOSE) build jekyll
.PHONY: build-jekyll

jekyll-clean: ## Clean all Jekyll content
$(DOCKER_COMPOSE) exec jekyll $(EXEC_SHELL) -c "bundle exec jekyll clean"
$(DOCKER_COMPOSE) exec jekyll $(EXEC_SHELL) -c "bundle exec jekyll build"
.PHONY: jekyll-clean

up: ## Start the docker containers
$(DOCKER_COMPOSE) up -d
.PHONE: up
.PHONY: up

down: ## Stop the docker containers
$(DOCKER_COMPOSE) down -v
.PHONE: down
.PHONY: down

logs: ## Show the logs of the containers
$(DOCKER_COMPOSE) logs -f
.PHONE: logs
.PHONY: logs

bash-8.1: ## Start a shell in the PHP 8.1 container
$(DOCKER_COMPOSE) exec php-8.1 $(EXEC_SHELL)
.PHONY: bash-8.1
bash-8.2: ## Start a shell in the PHP 8.2 container
$(DOCKER_COMPOSE) exec php-8.2 $(EXEC_SHELL)
.PHONY: bash-8.2
bash-8.3: ## Start a shell in the PHP 8.3 container
$(DOCKER_COMPOSE) exec php-8.3 $(EXEC_SHELL)
.PHONY: bash-8.3
bash-jekyll: ## Start a shell in the Jekyll container
$(DOCKER_COMPOSE) exec jekyll $(EXEC_SHELL)
.PHONY: bash-jekyll

### QA

local-ci: ## Run the Composer "local-ci" script in every containers
$(DOCKER_COMPOSE) exec php-8.1 $(EXEC_SHELL) -c "composer local-ci"
$(DOCKER_COMPOSE) exec php-8.2 $(EXEC_SHELL) -c "composer local-ci"
$(DOCKER_COMPOSE) exec php-8.3 $(EXEC_SHELL) -c "composer local-ci"
.PHONY: local-ci

### Misc

Expand Down
18 changes: 15 additions & 3 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
php-8.1:
tty: true
build:
context: .
context: php
args:
PHP_VERSION: 8.1
volumes:
Expand All @@ -12,7 +12,7 @@ services:
php-8.2:
tty: true
build:
context: .
context: php
args:
PHP_VERSION: 8.2
volumes:
Expand All @@ -21,8 +21,20 @@ services:
php-8.3:
tty: true
build:
context: .
context: php
args:
PHP_VERSION: 8.3
volumes:
- ..:/app

jekyll:
tty: true
build:
context: ../
dockerfile: docker/jekyll/Dockerfile
volumes:
- ../docs:/srv/jekyll
ports:
- "4000:4000"
- "35729:35729"
command: bundle exec jekyll serve --watch --incremental --host 0.0.0.0 --livereload
17 changes: 17 additions & 0 deletions docker/jekyll/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ruby:3.3.4

# Install Bundler & Jekyll
RUN set -eux; gem install jekyll bundler

# Clean up
WORKDIR /srv/jekyll

EXPOSE 4000
EXPOSE 35729

RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends bash

COPY docs/Gemfile ./
RUN set -eux; bundle install
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
Gemfile.lock
24 changes: 24 additions & 0 deletions docs/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
permalink: /404.html
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
55 changes: 55 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
source "https://rubygems.org"

# In sync with https://pages.github.com/versions/

gem "github-pages", "~> 232", group: :jekyll_plugins

gem "jemoji", "~>0.13.0"
gem "kramdown-parser-gfm", "~>1.1.0"
gem "kramdown", "~>2.4.0"
gem "liquid", "~>4.0.4"
gem "minima", "~>2.5.1"
gem "nokogiri", "~>1.16.7"
gem "rouge", "~>3.30.0"
gem "safe_yaml", "~>1.0.5"
gem "sass", "~>3.7.4"

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-avatar", "~> 0.8.0"
gem "jekyll-coffeescript", "~> 1.2.2"
gem "jekyll-commonmark-ghpages", "~> 0.5.1"
gem "jekyll-default-layout", "~> 0.1.5"
gem "jekyll-feed", "~> 0.17.0"
gem "jekyll-gist", "~> 1.5.0"
gem "jekyll-github-metadata", "~> 2.16.1"
gem "jekyll-include-cache", "~> 0.2.1"
gem "jekyll-mentions", "~> 1.6.0"
gem "jekyll-optional-front-matter", "~> 0.3.2"
gem "jekyll-paginate", "~> 1.1.0"
gem "jekyll-readme-index", "~> 0.3.0"
gem "jekyll-redirect-from", "~> 0.16.0"
gem "jekyll-relative-links", "~> 0.6.1"
gem "jekyll-remote-theme", "~> 0.4.3"
gem "jekyll-sass-converter", "~> 1.5.2"
gem "jekyll-seo-tag", "~> 2.8.0"
gem "jekyll-sitemap", "~> 1.4.0"
gem "jekyll-swiss", "~> 1.0.0"
gem "jekyll-theme-architect", "~> 0.2.0"
gem "jekyll-theme-cayman", "~> 0.2.0"
gem "jekyll-theme-dinky", "~> 0.2.0"
gem "jekyll-theme-hacker", "~> 0.2.0"
gem "jekyll-theme-leap-day", "~> 0.2.0"
gem "jekyll-theme-merlot", "~> 0.2.0"
gem "jekyll-theme-midnight", "~> 0.2.0"
gem "jekyll-theme-minimal", "~> 0.2.0"
gem "jekyll-theme-modernist", "~> 0.2.0"
gem "jekyll-theme-primer", "~> 0.6.0"
gem "jekyll-theme-slate", "~> 0.2.0"
gem "jekyll-theme-tactile", "~> 0.2.0"
gem "jekyll-theme-time-machine", "~> 0.2.0"
gem "jekyll-titles-from-headings", "~> 0.5.3"
end

# Additional
gem "just-the-docs"
58 changes: 58 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
title: Siglot
description: >- # this means to ignore newlines until "baseurl:"
Signals and Slots library for PHP
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: b_viguier
github_username: b-viguier

# Build settings
theme: just-the-docs
plugins:
- jekyll-feed

# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
# the internal "default list".
#
# Excluded items can be processed by explicitly listing the directories or
# their entries' file path in the `include:` list.
#
# exclude:
# - .sass-cache/
# - .jekyll-cache/
# - gemfiles/
# - Gemfile
# - Gemfile.lock
# - node_modules/
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/

# Just The Docs settings
callouts:
warning:
title: Warning
color: red
color_scheme: dark
# Footer last edited timestamp
last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter
last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html
# Footer "Edit this page on GitHub" link text
gh_edit_link: true # show or hide edit this page link
gh_edit_link_text: "Edit this page on GitHub."
gh_edit_repository: "https://github.com/b-viguier/Siglot" # the github URL for your repo
gh_edit_branch: "main" # the branch that your docs is served from
gh_edit_source: docs # the source that your files originate from
gh_edit_view_mode: "edit" # "tree" or "edit" if you want the user to jump into the editor immediately
aux_links:
Siglot on GitHub:
- https://github.com/b-viguier/Siglot
back_to_top: true
back_to_top_text: "Back to top"




16 changes: 16 additions & 0 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Getting Started
permalink: /getting_started
nav_order: 2
---

* TOC
{:toc}

## Installation

To install Siglot, you can use [Composer](https://getcomposer.org/):

```bash
composer require b-viguier/siglot
```
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Introduction
nav_order: 1
---
5 changes: 5 additions & 0 deletions docs/signals_slots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Signals & Slots
nav_order: 3
permalink: /signals_slots
---

0 comments on commit b4eb036

Please sign in to comment.