Skip to content

Switch documentation to github pages #866

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Merged
merged 6 commits into from
May 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/_site
/Gemfile.lock
28 changes: 28 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.5"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima", "~> 2.0"
gem "just-the-docs"

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "github-pages"
# gem "jekyll-feed", "~> 0.6"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?

38 changes: 38 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
title: enqueue-dev
description: A Jekyll theme for documentation
baseurl: "/enqueue-dev" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com

permalink: pretty
exclude:
- "node_modules/"
- "*.gemspec"
- "*.gem"
- "Gemfile"
- "Gemfile.lock"
- "package.json"
- "package-lock.json"
- "script/"
- "LICENSE.txt"
- "lib/"
- "bin/"
- "README.md"
- "Rakefile"

markdown: kramdown

# Enable or disable the site search
search_enabled: true

# Aux links for the upper right navigation
aux_links:
"enqueue-dev on GitHub":
- "//github.com/php-enqueue/enqueue-dev"

# Color scheme currently only supports "dark" or nil (default)
color_scheme: nil

remote_theme: pmarsceill/just-the-docs

plugins:
- jekyll-seo-tag
62 changes: 62 additions & 0 deletions docs/_includes/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<nav role="navigation" aria-label="Main navigation">
<p>
<button class="btn js-toggle-dark-mode">Switch to dark</button>
</p>

<script>
const toggleDarkMode = document.querySelector('.js-toggle-dark-mode')
const cssFile = document.querySelector('[rel="stylesheet"]')
const originalCssRef = cssFile.getAttribute('href')
const darkModeCssRef = originalCssRef.replace('just-the-docs.css', 'dark-mode-preview.css')

addEvent(toggleDarkMode, 'click', function () {
if (cssFile.getAttribute('href') === originalCssRef) {
cssFile.setAttribute('href', darkModeCssRef)
} else {
cssFile.setAttribute('href', originalCssRef)
}
})
</script>
<ul class="navigation-list">
{% assign pages_list = site.html_pages | sort:"nav_order" %}
{% for node in pages_list %}
{% unless node.nav_exclude %}
{% if node.parent == nil %}
<li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
{% if page.parent == node.title or page.grand_parent == node.title %}
{% assign first_level_url = node.url | absolute_url %}
{% endif %}
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
{% if node.has_children %}
{% assign children_list = site.html_pages | sort:"nav_order" %}
<ul class="navigation-list-child-list ">
{% for child in children_list %}
{% if child.parent == node.title %}
<li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
{% if page.url == child.url or page.parent == child.title %}
{% assign second_level_url = child.url | absolute_url %}
{% endif %}
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
{% if child.has_children %}
{% assign grand_children_list = site.html_pages | sort:"nav_order" %}
<ul class="navigation-list-child-list">
{% for grand_child in grand_children_list %}
{% if grand_child.parent == child.title %}
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
<a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}
{% endunless %}
{% endfor %}
</ul>
</nav>
21 changes: 19 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults

layout: default
title: Index
---

<h2 align="center">Supporting Enqueue</h2>

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:
Expand Down Expand Up @@ -37,7 +45,7 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
* [Job queue](#job-queue)
- [Run unique job](job_queue/run_unique_job.md)
- [Run sub job(s)](job_queue/run_sub_job.md)
* [EnqueueBundle (Symfony)](#enqueue-bundle-symfony).
* [EnqueueBundle (Symfony)](#enqueue-bundle-symfony).
- [Quick tour](bundle/quick_tour.md)
- [Config reference](bundle/config_reference.md)
- [Cli commands](bundle/cli_commands.md)
Expand All @@ -49,7 +57,7 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
- [Consumption extension](bundle/consumption_extension.md)
- [Production settings](bundle/production_settings.md)
- [Debugging](bundle/debugging.md)
- [Functional testing](bundle/functional_testing.md)
- [Functional testing](bundle/functional_testing.md)
* [Laravel](#laravel)
- [Quick tour](laravel/quick_tour.md)
- [Queues](laravel/queues.md)
Expand Down Expand Up @@ -91,3 +99,12 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
* [Yii PHP Framework has adopted AMQP Interop.](https://blog.forma-pro.com/yii-php-framework-has-adopted-amqp-interop-85ab47c9869f)
* [(En)queue Symfony console commands](http://tech.yappa.be/enqueue-symfony-console-commands)
* [From RabbitMq to PhpEnqueue via Symfony Messenger](https://medium.com/@stefanoalletti_40357/from-rabbitmq-to-phpenqueue-via-symfony-messenger-b8260d0e506c)

## Contributing to this documentation

To run this documentation locally, you can either create Jekyll environment on your local computer or use docker container.
To run docker container you can use a command from repository root directory:
```shell
docker run -p 4000:4000 --rm --volume="${PWD}/docs:/srv/jekyll" -it jekyll/jekyll jekyll serve --watch
```
Documentation will then be available for you on http://localhost:4000/ once build completes and rebuild automatically on changes.