Skip to content

webisters/docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webisters Docs

Source for the Webisters Framework documentation site, published as a static site to GitHub Pages at https://docs.webisters.com.

The site is authored in PHP (templated pages + a small router) and then rendered to plain HTML for hosting. GitHub Pages cannot run PHP, so the built HTML lives on the gh-pages branch while this main branch holds the source.

Layout

  • index.php, contributors.php - top-level pages
  • guides/ - hand-written guides (framework, projects, libraries)
  • packages/ - per-package landing pages
  • includes/ - shared templates (header.php, sidebar.php, footer.php, config.php, …)
  • includes/class-page.php - renders a class-reference page for any Framework\* class via PHP Reflection against ../../libraries/<slug>/src
  • assets/ - override.css, layout.js (client-side search), logo.svg
  • router.php - PHP built-in server router (dev only)
  • build-static.php - crawls the dev server and mirrors every page to _site/

Preview locally

php -S 127.0.0.1:9090 router.php
# open http://127.0.0.1:9090/

Build the static site

The class-reference pages are generated by reflecting the real framework classes, so the build must run from inside the full monorepo (this folder sitting next to ../../libraries).

# 1. serve
php -S 127.0.0.1:9090 router.php    # in one terminal

# 2. crawl -> _site/ (in another terminal)
BASE=http://127.0.0.1:9090 OUT=./_site php build-static.php

build-static.php mirrors all reachable pages, rewrites internal .php links to .html, copies assets/, and writes .nojekyll.

Deploy

The contents of _site/ live on the gh-pages branch. A GitHub Actions workflow on that branch (.github/workflows/pages.yml) uploads the branch as a Pages artifact and deploys it - so any push to gh-pages republishes the site. The CNAME file pins the custom domain docs.webisters.com; .github/ and CNAME are ignored when copying the freshly built _site/ over the top.

git worktree add ../_docs_ghpages gh-pages
cp -r _site/* _site/.nojekyll ../_docs_ghpages/
# (keep ../_docs_ghpages/CNAME and ../_docs_ghpages/.github)
cd ../_docs_ghpages && git add -A && git commit -m "Rebuild docs" && git push

Pages is configured with build_type: workflow (not the legacy branch pipeline).

About

Webisters Framework documentation - static site served via GitHub Pages at docs.webisters.com

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors