mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-06 14:16:41 +00:00
enh: add BLOG_DOMAIN support to www project and github actions
This commit is contained in:
parent
677c374d4a
commit
ff583270db
@ -1,12 +1,18 @@
|
|||||||
# This is the porject root (where the .env file lives)
|
# This is the porject root (where the .env file lives)
|
||||||
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Do this so these actually export as environment variables, not just shell variables
|
||||||
|
set -a
|
||||||
|
|
||||||
# https or http, as you wish
|
# https or http, as you wish
|
||||||
PUBLIC_HTTP_PROTOCOL=https
|
PUBLIC_HTTP_PROTOCOL=https
|
||||||
|
|
||||||
# The domain name the dashboard app
|
# The domain name the dashboard app
|
||||||
PUBLIC_APP_DOMAIN=app.pockethost.lvh.me
|
PUBLIC_APP_DOMAIN=app.pockethost.lvh.me
|
||||||
|
|
||||||
|
# The domain name for the marketing/blog domain
|
||||||
|
PUBLIC_BLOG_DOMAIN=pockethost.lvh.me
|
||||||
|
|
||||||
# The name of the central PocketHost database. This is both a subdomain and a file name.
|
# The name of the central PocketHost database. This is both a subdomain and a file name.
|
||||||
PUBLIC_APP_DB=pockethost-central
|
PUBLIC_APP_DB=pockethost-central
|
||||||
|
|
||||||
@ -52,3 +58,5 @@ PH_BIN_CACHE=$ROOT/.pbincache
|
|||||||
PH_FTP_PASV_IP=0.0.0.0
|
PH_FTP_PASV_IP=0.0.0.0
|
||||||
PH_FTP_PASV_PORT_MIN=10000
|
PH_FTP_PASV_PORT_MIN=10000
|
||||||
PH_FTP_PASV_PORT_MAX=20000
|
PH_FTP_PASV_PORT_MAX=20000
|
||||||
|
|
||||||
|
set +a
|
4
.github/workflows/publish.yaml
vendored
4
.github/workflows/publish.yaml
vendored
@ -7,6 +7,10 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
deployments: write
|
deployments: write
|
||||||
name: Publish to Cloudflare Pages
|
name: Publish to Cloudflare Pages
|
||||||
|
env:
|
||||||
|
PUBLIC_HTTP_PROTOCOL: 'https'
|
||||||
|
PUBLIC_BLOG_DOMAIN: 'pockethost.io'
|
||||||
|
PUBLIC_APP_DOMAIN: 'app.pockethost.io'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
9
packages/www/_data/env.js
Normal file
9
packages/www/_data/env.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
const env = {
|
||||||
|
HTTP_PROTOCOL: process.env.PUBLIC_HTTP_PROTOCOL || 'https',
|
||||||
|
BLOG_DOMAIN: process.env.PUBLIC_BLOG_DOMAIN || 'pockethost.lvh.me',
|
||||||
|
APP_DOMAIN: process.env.PUBLIC_APP_DOMAIN || 'app.pockethost.lvh.me',
|
||||||
|
}
|
||||||
|
env.APP_URL = `${env.HTTP_PROTOCOL}://${env.APP_DOMAIN}`
|
||||||
|
env.BLOG_URL = `${env.HTTP_PROTOCOL}://${env.BLOG_DOMAIN}`
|
||||||
|
|
||||||
|
module.exports = env
|
@ -1,6 +1,8 @@
|
|||||||
|
const { BLOG_URL } = require('./env')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
title: 'PocketHost',
|
title: 'PocketHost',
|
||||||
url: 'https://pockethost.io/',
|
url: BLOG_URL,
|
||||||
language: 'en',
|
language: 'en',
|
||||||
description:
|
description:
|
||||||
'Get a PocketBase backend for your next app in under 10 seconds.',
|
'Get a PocketBase backend for your next app in under 10 seconds.',
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<!-- Twitter Meta Tags -->
|
<!-- Twitter Meta Tags -->
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta property="twitter:domain" content="pockethost.io">
|
<meta property="twitter:domain" content="{{ env.BLOG_DOMAIN }}">
|
||||||
<meta property="twitter:url" content="{{ metadata.url + page.url }}">
|
<meta property="twitter:url" content="{{ metadata.url + page.url }}">
|
||||||
<meta name="twitter:title" content="{{ title }} - PocketHost">
|
<meta name="twitter:title" content="{{ title }} - PocketHost">
|
||||||
<meta name="twitter:description" content="{{ description or metadata.description }}">
|
<meta name="twitter:description" content="{{ description or metadata.description }}">
|
||||||
|
@ -15,7 +15,7 @@ numberOfLatestPostsToShow: 3
|
|||||||
building <b class='text-green-600 dark:text-green-400'>new features</b> for your web app.
|
building <b class='text-green-600 dark:text-green-400'>new features</b> for your web app.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{ Buttons.PrimaryButton("Get Started", "https://app.pockethost.io/", "fa-solid fa-arrow-right") }}
|
{{ Buttons.PrimaryButton("Get Started", env.APP_URL, "fa-solid fa-arrow-right") }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='w-full p-8 lg:w-1/2 lg:block hidden'>
|
<div class='w-full p-8 lg:w-1/2 lg:block hidden'>
|
||||||
@ -82,7 +82,7 @@ numberOfLatestPostsToShow: 3
|
|||||||
|
|
||||||
<div class="container mx-auto md:bg-gradient-to-r md:from-zinc-900 md:to-zinc-800 bg-zinc-800 border-zinc-700 border-2 rounded-[75px] flex flex-wrap mb-12 shadow-xl overflow-hidden">
|
<div class="container mx-auto md:bg-gradient-to-r md:from-zinc-900 md:to-zinc-800 bg-zinc-800 border-zinc-700 border-2 rounded-[75px] flex flex-wrap mb-12 shadow-xl overflow-hidden">
|
||||||
<div class='bg-zinc-900 md:w-1/2'>
|
<div class='bg-zinc-900 md:w-1/2'>
|
||||||
{{ MainFeatureBlock("fa-laptop-code", "Up in 30 seconds", "Work Smarter, Not Harder", "A backend for your next app is as fast as signing up. No provisioning servers, no Docker fiddling, just B(ad)aaS productivity. Pick a unique project name and connect with our JS Client.", "Create Your New Backend", "https://app.pockethost.io/") }}
|
{{ MainFeatureBlock("fa-laptop-code", "Up in 30 seconds", "Work Smarter, Not Harder", "A backend for your next app is as fast as signing up. No provisioning servers, no Docker fiddling, just B(ad)aaS productivity. Pick a unique project name and connect with our JS Client.", "Create Your New Backend", env.APP_URL) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='bg-zinc-800 md:w-1/2'>
|
<div class='bg-zinc-800 md:w-1/2'>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"build": "npx @11ty/eleventy",
|
"build": "npx @11ty/eleventy",
|
||||||
"build-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/",
|
"build-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/",
|
||||||
"start:tailwind": "tailwind -i ./public/css/index.css -o ./_site/css/index.css --watch",
|
"start:tailwind": "tailwind -i ./public/css/index.css -o ./_site/css/index.css --watch",
|
||||||
"start": "npx @11ty/eleventy --serve --quiet",
|
"start": "source ../../.env && npx @11ty/eleventy --serve --quiet",
|
||||||
"debug": "DEBUG=Eleventy* npx @11ty/eleventy",
|
"debug": "DEBUG=Eleventy* npx @11ty/eleventy",
|
||||||
"debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet",
|
"debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet",
|
||||||
"benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy",
|
"benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user