Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork41
ThePHPF/thephp.foundation
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is the source code for the website ofthephp.foundation.It is built using the PHP static-site generatorSculpin, and usesTailwind CSS for design and layout.
To submit a blog post, create a pull request, adding a new file undersource/_posts/
in the format{4-digit Year}-{2-digit Month}-{2-digit Day}-{dash-separated title}.md
.All posts are written using Markdown with frontmatter YAML, and should have the following general format:
---title:Title for the postlayout:posttags: -updateauthor:name:Your nameurl:A URL with information on you---Markdown content starts here
The site
To develop the website, you will need:
- PHP 8.3 or later
- Composer
- Node 20 with NPM
Install PHP dependencies using Composer:
$ composer install
Install CSS dependencies using NPM:
$ npm install
The site CSS is intentionally omitted from the source tree, as it is built using Tailwind from HTML classes.As such, you will need to build the CSS before initial testing:
$ npx tailwind -i assets/css/app.css -o source/assets/css/app.css
You can start the Sculpin development server using the following within a terminal:
$ ./vendor/bin/sculpin generate --watch --server
This will launch the server athttps://localhost:8000
As you make content changes and save them, the server will regenerate pages automatically, allowing you to preview in your browser.
When done, pressCtrl-C
.
If you are making any design changes, including adding HTML class attributes, you should run the Tailwind watcher; this ensures a page refresh will pick up any CSS changes.Invoke the watcher in a terminal as follows:
$ npx tailwind -i assets/css/app.css -o source/assets/css/app.css --watch
When done, pressCtrl-C
.
The primary CSS file is kept inassets/css/app.css
, and contains a number of overrides for common HTML tags; this is done so that rendered Markdown can remain styled.All other styles are derived from CSS classes; see theTailwind CSS documentation for details on what classes you can compose to achieve different design goals.
This site has two Sculpin content types:
- pages (under
source/_pages/
) - posts (under
source/_posts/
)
Pages are one-off pages with a static permalink.
Posts are blog posts, and will show up on the/blog
page as well as in the site feed.
The site defines two top-level pages:
index.html
: The site landing page.blog.html
: The blog landing page.
Thedeployment workflow auto-deploys to gh-pages on a push to the main branch.
About
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.