Initial commit: The Old Fitz Public House site

Static-turned-PHP site for a pub in Marion, Indiana, with:
- Hero section with tiled brick-texture background
- Live-capable stat card (Facebook followers/reviews via Graph API,
  with graceful fallback to config.php constants when no token is set)
- Open Graph / Twitter Card meta tags for social sharing
- robots.txt

config.php is gitignored (holds a Facebook Page Access Token once
generated); config.sample.php is the tracked template — copy it to
config.php and fill in values to run this locally or in deployment.
This commit is contained in:
David Dyer committed 2026-08-29 19:32:20 -04:00
commit 48e26d671d
11 files changed
+883

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
<?php
/**
* Site config. KEEP THIS FILE PRIVATE — if this project ever goes under
* git, add config.php to .gitignore before committing anything, since
* FB_PAGE_ACCESS_TOKEN is a secret.
*/
// Base URL the site is currently reachable at. Used for social sharing
// meta tags (og:url, og:image, twitter:image), which need absolute URLs.
// Currently pointed at the temporary daviddyer.me subdomain — update
// this to the permanent domain once the site moves there.
define('SITE_URL', 'https://theoldfitz.daviddyer.me');
// The Old Fitz's Facebook Page ID (from the facebook.com/profile.php?id=... links already on the site).
define('FB_PAGE_ID', '100086635646712');
// Paste a Page Access Token here to make the homepage stats live.
// Until this is filled in, the site quietly uses the fallback numbers below.
//
// To generate one:
// 1. Go to https://developers.facebook.com/apps and create an app
// (type: "Business"), logged in as an admin of The Old Fitz Page.
// 2. In Graph API Explorer (developers.facebook.com/tools/explorer),
// pick that app, select "Page Access Token" for The Old Fitz,
// requesting the pages_read_engagement permission.
// 3. Use the "Access Token Debugger" (developers.facebook.com/tools/debug/accesstoken)
// to extend it to a long-lived token (~60 days). Long-lived Page
// tokens generally don't expire on their own with regular use, but
// Meta can still invalidate one (password change, permission
// changes, app review) — if that happens, this just falls back to
// the numbers below instead of breaking the page.
define('FB_PAGE_ACCESS_TOKEN', '');
// How often to re-fetch from Facebook, in seconds. 6 hours is plenty for
// numbers that move a few times a month.
define('FB_STATS_CACHE_TTL', 6 * 60 * 60);
// Fallback numbers — used whenever there's no token yet, or the Facebook
// API call fails for any reason. Update these by hand if you're not
// using the live token.
define('FB_FALLBACK_RECOMMEND_PCT', 92);
define('FB_FALLBACK_REVIEW_COUNT', 11);
define('FB_FALLBACK_FOLLOWERS', 2600);