Skip to content

Commit 7f0f3f1

Browse files
authored
Merge pull request #866 from Steveb-p/master
Switch documentation to github pages
2 parents a57ec38 + 55e9a8a commit 7f0f3f1

File tree

5 files changed

+149
-2
lines changed

5 files changed

+149
-2
lines changed

Diff for: docs/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/_site
2+
/Gemfile.lock

Diff for: docs/Gemfile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
source "https://rubygems.org"
2+
3+
# Hello! This is where you manage which Jekyll version is used to run.
4+
# When you want to use a different version, change it below, save the
5+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
6+
#
7+
# bundle exec jekyll serve
8+
#
9+
# This will help ensure the proper Jekyll version is running.
10+
# Happy Jekylling!
11+
gem "jekyll", "~> 3.8.5"
12+
13+
# This is the default theme for new Jekyll sites. You may change this to anything you like.
14+
# gem "minima", "~> 2.0"
15+
gem "just-the-docs"
16+
17+
# If you have any plugins, put them here!
18+
group :jekyll_plugins do
19+
gem "github-pages"
20+
# gem "jekyll-feed", "~> 0.6"
21+
end
22+
23+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
24+
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
25+
26+
# Performance-booster for watching directories on Windows
27+
gem "wdm", "~> 0.1.0" if Gem.win_platform?
28+

Diff for: docs/_config.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
title: enqueue-dev
2+
description: A Jekyll theme for documentation
3+
baseurl: "/enqueue-dev" # the subpath of your site, e.g. /blog
4+
url: "" # the base hostname & protocol for your site, e.g. http://example.com
5+
6+
permalink: pretty
7+
exclude:
8+
- "node_modules/"
9+
- "*.gemspec"
10+
- "*.gem"
11+
- "Gemfile"
12+
- "Gemfile.lock"
13+
- "package.json"
14+
- "package-lock.json"
15+
- "script/"
16+
- "LICENSE.txt"
17+
- "lib/"
18+
- "bin/"
19+
- "README.md"
20+
- "Rakefile"
21+
22+
markdown: kramdown
23+
24+
# Enable or disable the site search
25+
search_enabled: true
26+
27+
# Aux links for the upper right navigation
28+
aux_links:
29+
"enqueue-dev on GitHub":
30+
- "//github.com/php-enqueue/enqueue-dev"
31+
32+
# Color scheme currently only supports "dark" or nil (default)
33+
color_scheme: nil
34+
35+
remote_theme: pmarsceill/just-the-docs
36+
37+
plugins:
38+
- jekyll-seo-tag

Diff for: docs/_includes/nav.html

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<nav role="navigation" aria-label="Main navigation">
2+
<p>
3+
<button class="btn js-toggle-dark-mode">Switch to dark</button>
4+
</p>
5+
6+
<script>
7+
const toggleDarkMode = document.querySelector('.js-toggle-dark-mode')
8+
const cssFile = document.querySelector('[rel="stylesheet"]')
9+
const originalCssRef = cssFile.getAttribute('href')
10+
const darkModeCssRef = originalCssRef.replace('just-the-docs.css', 'dark-mode-preview.css')
11+
12+
addEvent(toggleDarkMode, 'click', function () {
13+
if (cssFile.getAttribute('href') === originalCssRef) {
14+
cssFile.setAttribute('href', darkModeCssRef)
15+
} else {
16+
cssFile.setAttribute('href', originalCssRef)
17+
}
18+
})
19+
</script>
20+
<ul class="navigation-list">
21+
{% assign pages_list = site.html_pages | sort:"nav_order" %}
22+
{% for node in pages_list %}
23+
{% unless node.nav_exclude %}
24+
{% if node.parent == nil %}
25+
<li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
26+
{% if page.parent == node.title or page.grand_parent == node.title %}
27+
{% assign first_level_url = node.url | absolute_url %}
28+
{% endif %}
29+
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
30+
{% if node.has_children %}
31+
{% assign children_list = site.html_pages | sort:"nav_order" %}
32+
<ul class="navigation-list-child-list ">
33+
{% for child in children_list %}
34+
{% if child.parent == node.title %}
35+
<li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
36+
{% if page.url == child.url or page.parent == child.title %}
37+
{% assign second_level_url = child.url | absolute_url %}
38+
{% endif %}
39+
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
40+
{% if child.has_children %}
41+
{% assign grand_children_list = site.html_pages | sort:"nav_order" %}
42+
<ul class="navigation-list-child-list">
43+
{% for grand_child in grand_children_list %}
44+
{% if grand_child.parent == child.title %}
45+
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
46+
<a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
47+
</li>
48+
{% endif %}
49+
{% endfor %}
50+
</ul>
51+
{% endif %}
52+
</li>
53+
{% endif %}
54+
{% endfor %}
55+
</ul>
56+
{% endif %}
57+
</li>
58+
{% endif %}
59+
{% endunless %}
60+
{% endfor %}
61+
</ul>
62+
</nav>

Diff for: docs/index.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
# Feel free to add content and custom Front Matter to this file.
3+
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
4+
5+
layout: default
6+
title: Index
7+
---
8+
19
<h2 align="center">Supporting Enqueue</h2>
210

311
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
@@ -37,7 +45,7 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
3745
* [Job queue](#job-queue)
3846
- [Run unique job](job_queue/run_unique_job.md)
3947
- [Run sub job(s)](job_queue/run_sub_job.md)
40-
* [EnqueueBundle (Symfony)](#enqueue-bundle-symfony).
48+
* [EnqueueBundle (Symfony)](#enqueue-bundle-symfony).
4149
- [Quick tour](bundle/quick_tour.md)
4250
- [Config reference](bundle/config_reference.md)
4351
- [Cli commands](bundle/cli_commands.md)
@@ -49,7 +57,7 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
4957
- [Consumption extension](bundle/consumption_extension.md)
5058
- [Production settings](bundle/production_settings.md)
5159
- [Debugging](bundle/debugging.md)
52-
- [Functional testing](bundle/functional_testing.md)
60+
- [Functional testing](bundle/functional_testing.md)
5361
* [Laravel](#laravel)
5462
- [Quick tour](laravel/quick_tour.md)
5563
- [Queues](laravel/queues.md)
@@ -91,3 +99,12 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
9199
* [Yii PHP Framework has adopted AMQP Interop.](https://blog.forma-pro.com/yii-php-framework-has-adopted-amqp-interop-85ab47c9869f)
92100
* [(En)queue Symfony console commands](http://tech.yappa.be/enqueue-symfony-console-commands)
93101
* [From RabbitMq to PhpEnqueue via Symfony Messenger](https://medium.com/@stefanoalletti_40357/from-rabbitmq-to-phpenqueue-via-symfony-messenger-b8260d0e506c)
102+
103+
## Contributing to this documentation
104+
105+
To run this documentation locally, you can either create Jekyll environment on your local computer or use docker container.
106+
To run docker container you can use a command from repository root directory:
107+
```shell
108+
docker run -p 4000:4000 --rm --volume="${PWD}/docs:/srv/jekyll" -it jekyll/jekyll jekyll serve --watch
109+
```
110+
Documentation will then be available for you on http://localhost:4000/ once build completes and rebuild automatically on changes.

0 commit comments

Comments
 (0)