diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f98c7bf --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..d67e56b --- /dev/null +++ b/.github/workflows/preview.yml @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c5bd949 --- /dev/null +++ b/.gitignore @@ -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 +*~ diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..5c41b36 --- /dev/null +++ b/Gemfile @@ -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 diff --git a/README.md b/README.md index 9e152e9..ee4526e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# website +# Website The code behind the public php-debugger.dev website diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..409ac90 --- /dev/null +++ b/_config.yml @@ -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 diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..2d4d9fa --- /dev/null +++ b/_data/navigation.yml @@ -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/ diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..296c982 --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,21 @@ + + + diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 0000000..1677cd4 --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,68 @@ + + +{% include seo.html %} + +{% unless site.atom_feed.hide %} + +{% endunless %} + + + + + + + + + +{% if site.minimal_mistakes_skin2 %} + + +{% endif %} + + + + +{% if site.head_scripts %} + {% for script in site.head_scripts %} + + {% endfor %} +{% endif %} diff --git a/_includes/masthead.html b/_includes/masthead.html new file mode 100644 index 0000000..9a3e75a --- /dev/null +++ b/_includes/masthead.html @@ -0,0 +1,44 @@ +{% capture logo_path %}{{ site.logo }}{% endcapture %} +{% capture logo_path_dark %}{{ site.logo_dark }}{% endcapture %} + +
+
+
+ +
+
+
diff --git a/assets/css/custom.scss b/assets/css/custom.scss new file mode 100644 index 0000000..98d228e --- /dev/null +++ b/assets/css/custom.scss @@ -0,0 +1,7 @@ +--- +--- + +// Custom styles shared across all themes +.site-logo img { + max-height: 4rem !important; +} diff --git a/assets/css/main.scss b/assets/css/main.scss new file mode 100644 index 0000000..807fa5b --- /dev/null +++ b/assets/css/main.scss @@ -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 diff --git a/assets/css/theme2.scss b/assets/css/theme2.scss new file mode 100644 index 0000000..43c55c1 --- /dev/null +++ b/assets/css/theme2.scss @@ -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 diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..080850f --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,38 @@ +--- +layout: single +title: "Installation" +permalink: /docs/installation/ +sidebar: + nav: "docs" +--- + +Installing PHP Debugger is straightforward and similar to installing other PHP extensions. The extension is available through PIE and can also be compiled from source. Once installed, you'll need to configure your php.ini file to enable the extension and set up your IDE to communicate with the debugger using the DBGp protocol. + +## Configuration + +Add the following to your `php.ini` file: + +```ini +zend_extension=php_debugger +php_debugger.mode=debug +php_debugger.start_with_request=trigger +php_debugger.client_host=127.0.0.1 +php_debugger.client_port=9003 +``` + +## Usage Example + +You can trigger breakpoints programmatically in your PHP code: + +```php + +# What is PHP Debugger? + +A PHP debugging extension focused on step debugging with near-zero overhead. + +- Forked from [Xdebug](https://xdebug.org/), and fully compatible with it. +- Just debugging, with profiling, coverage, and tracing removed. +- Near-zero overhead when not connected, and much faster when active. +- Always on, no need to enable and disable it. +- Can be statically linked to your PHP binary, removing the need for a PHP extension. + +### Main Repository + +Visit the [PHP Debugger GitHub repository](https://github.com/php-debugger/php-debugger) to get started, view documentation, and contribute to the project.