Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

ThePHPF/thephp.foundation

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.

Submitting blog posts

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

Developing/maintaining the site

The site

Requirements

To develop the website, you will need:

  • PHP 8.3 or later
  • Composer
  • Node 20 with NPM

Installing dependencies

Install PHP dependencies using Composer:

$ composer install

Install CSS dependencies using NPM:

$ npm install

Build the CSS

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

Testing the site

Content changes

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.

CSS/Design changes

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.

Content Types

This site has two Sculpin content types:

  • pages (undersource/_pages/)
  • posts (undersource/_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.

Top-level pages

The site defines two top-level pages:

  • index.html: The site landing page.
  • blog.html: The blog landing page.

Deployment

Thedeployment workflow auto-deploys to gh-pages on a push to the main branch.


[8]ページ先頭

©2009-2025 Movatter.jp