Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Build with Jekyll
run: bundle exec jekyll build
env:
JEKYLL_ENV: production

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _site
branch: gh-pages
clean-exclude: pr-preview
force: false
39 changes: 39 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy PR previews

concurrency: preview-${{ github.ref }}

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
if: github.event.action != 'closed'

- name: Build with Jekyll
run: bundle exec jekyll build --baseurl "/${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.pull_request.number }}"
env:
JEKYLL_ENV: production
if: github.event.action != 'closed'

- name: Deploy PR Preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: _site
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
vendor/

# Ruby
Gemfile.lock
*.gem
.bundle/

# macOS
.DS_Store

# IDEs
.idea/
.vscode/
*.swp
*.swo
*~
17 changes: 17 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source "https://rubygems.org"

gem "github-pages", group: :jekyll_plugins

gem "tzinfo-data"
gem "wdm", "~> 0.1.0" if Gem.win_platform?

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-paginate"
gem "jekyll-sitemap"
gem "jekyll-gist"
gem "jekyll-feed"
gem "jemoji"
gem "jekyll-include-cache"
gem "jekyll-algolia"
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# website
# Website
The code behind the public php-debugger.dev website
59 changes: 59 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Site Settings
title: " "
logo: "https://raw.githubusercontent.com/php-debugger/art/main/php-debugger-lockup.png"
logo_dark: "https://raw.githubusercontent.com/php-debugger/art/main/php-debugger-lockup-white.png"
email:
description: >-
A PHP debugger extension focused on step debugging with near-zero overhead.
baseurl: ""
url: "https://php-debugger.github.io"
repository: "php-debugger/php-debugger"

# Build settings
markdown: kramdown
remote_theme: "mmistakes/minimal-mistakes@4.28.0"

# Minimal Mistakes theme settings
minimal_mistakes_skin: "contrast"
minimal_mistakes_skin2: "dark"

# Site Author
author:
name: "PHP Debugger"
links:
- label: "GitHub"
icon: "fab fa-fw fa-github"
url: "https://github.com/php-debugger/php-debugger"

# Defaults
defaults:
- scope:
path: ""
type: pages
values:
layout: single
author_profile: false
classes: wide
- scope:
path: "docs"
type: pages
values:
layout: single
author_profile: false
sidebar:
nav: "docs"
toc: false

# Plugins
plugins:
- jekyll-include-cache

# Footer
footer:
links:
- label: "GitHub"
icon: "fab fa-fw fa-github"
url: "https://github.com/php-debugger/php-debugger"

atom_feed:
hide: true
11 changes: 11 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
main:
- title: "Docs"
url: /docs/introduction/

docs:
- title: "Getting Started"
children:
- title: "Introduction"
url: /docs/introduction/
- title: "Installation"
url: /docs/installation/
21 changes: 21 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="page__footer-follow">
<ul class="social-icons">
{% if site.data.ui-text[site.locale].follow_label %}
<li><strong>{{ site.data.ui-text[site.locale].follow_label }}</strong></li>
{% endif %}

{% if site.footer.links %}
{% for link in site.footer.links %}
{% if link.label and link.url %}
<li><a href="{{ link.url }}" rel="nofollow noopener noreferrer"><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i> {{ link.label }}</a></li>
{% endif %}
{% endfor %}
{% endif %}

{% unless site.atom_feed.hide %}
<li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}"><i class="fas fa-fw fa-rss-square" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}</a></li>
{% endunless %}
</ul>
</div>

<div class="page__footer-copyright">&copy; {{ site.time | date: '%Y' }} PHP Debugger</div>
68 changes: 68 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<meta charset="utf-8">

{% include seo.html %}

{% unless site.atom_feed.hide %}
<link href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
{% endunless %}

<!-- https://t.co/dKP3o1e -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<script>
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
</script>

<!-- For all browsers -->
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}" id="theme_source">
<link rel="stylesheet" href="{{ '/assets/css/custom.css' | relative_url }}">
{% if site.minimal_mistakes_skin2 %}
<link rel="stylesheet alternate" href="{{ '/assets/css/theme2.css' | relative_url }}" id="theme_source_2">
<script>
let theme = sessionStorage.getItem('theme');
if(theme === "dark")
{
sessionStorage.setItem('theme', 'dark');
node1 = document.getElementById('theme_source');
node2 = document.getElementById('theme_source_2');
node1.setAttribute('rel', 'stylesheet alternate');
node2.setAttribute('rel', 'stylesheet');

// Switch logo on page load
document.addEventListener('DOMContentLoaded', function() {
var logo_light = document.getElementById('logo_light');
var logo_dark = document.getElementById('logo_dark');
if(logo_light && logo_dark) {
logo_light.style.display = 'none';
logo_dark.style.display = 'inline';
}
});
}
else
{
sessionStorage.setItem('theme', 'light');
}
</script>
{% endif %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css">

<!--[if IE]>
<style>
/* old IE unsupported flexbox fixes */
.greedy-nav .site-title {
padding-right: 3em;
}
.greedy-nav button {
position: absolute;
top: 0;
right: 0;
height: 100%;
}
</style>
<![endif]-->

{% if site.head_scripts %}
{% for script in site.head_scripts %}
<script src="{{ script | relative_url }}"></script>
{% endfor %}
{% endif %}
44 changes: 44 additions & 0 deletions _includes/masthead.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{% capture logo_path %}{{ site.logo }}{% endcapture %}
{% capture logo_path_dark %}{{ site.logo_dark }}{% endcapture %}

<div class="masthead">
<div class="masthead__inner-wrap">
<div class="masthead__menu">
<nav id="site-nav" class="greedy-nav">
{% unless logo_path == empty %}
<a class="site-logo" href="{{ '/' | relative_url }}">
<img src="{{ logo_path | relative_url }}" alt="{{ site.masthead_title | default: site.title }}" class="logo-light" id="logo_light">
{% unless logo_path_dark == empty %}
<img src="{{ logo_path_dark | relative_url }}" alt="{{ site.masthead_title | default: site.title }}" class="logo-dark" id="logo_dark" style="display: none;">
{% endunless %}
</a>
{% endunless %}
<a class="site-title" href="{{ '/' | relative_url }}">
{{ site.masthead_title | default: site.title }}
{% if site.subtitle %}<span class="site-subtitle">{{ site.subtitle }}</span>{% endif %}
</a>
<ul class="visible-links">
{%- for link in site.data.navigation.main -%}
<li class="masthead__menu-item">
<a href="{{ link.url | relative_url }}"{% if link.description %} title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
</li>
{%- endfor -%}
</ul>
{% if site.minimal_mistakes_skin2 %}
<i class="fas fa-fw fa-adjust" aria-hidden="true" onclick="node1=document.getElementById('theme_source');node2=document.getElementById('theme_source_2');logo_light=document.getElementById('logo_light');logo_dark=document.getElementById('logo_dark');if(node1.getAttribute('rel')=='stylesheet'){node1.setAttribute('rel', 'stylesheet alternate'); node2.setAttribute('rel', 'stylesheet');sessionStorage.setItem('theme', 'dark');if(logo_light && logo_dark){logo_light.style.display='none';logo_dark.style.display='inline';}}else{node2.setAttribute('rel', 'stylesheet alternate'); node1.setAttribute('rel', 'stylesheet');sessionStorage.setItem('theme', 'light');if(logo_light && logo_dark){logo_light.style.display='inline';logo_dark.style.display='none';}} return false;"></i>
{% endif %}
{% if site.search == true %}
<button class="search__toggle" type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].search_label | default: "Toggle search" }}</span>
<i class="fas fa-search"></i>
</button>
{% endif %}
<button class="greedy-nav__toggle hidden" type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle menu" }}</span>
<div class="navicon"></div>
</button>
<ul class="hidden-links hidden"></ul>
</nav>
</div>
</div>
</div>
7 changes: 7 additions & 0 deletions assets/css/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
---

// Custom styles shared across all themes
.site-logo img {
max-height: 4rem !important;
}
13 changes: 13 additions & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
search: false
---

@charset "utf-8";

// Override colors before imports
$primary-color: #e24b4a !default;
$link-color: #e24b4a !default;

@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin
@import "minimal-mistakes"; // main partials
11 changes: 11 additions & 0 deletions assets/css/theme2.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
---

@charset "utf-8";

// Override colors before imports
$primary-color: #e24b4a !default;
$link-color: #e24b4a !default;

@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin2 | default: 'default' }}"; // skin
@import "minimal-mistakes"; // main partials
Loading
Loading