A professional, responsive marketing website built with Jekyll and hosted on GitHub Pages.
- Ruby 2.7 or higher
- Bundler gem
-
Clone the repository (if you haven't already):
git clone https://github.com/hcyberphysical/hcyberphysical.github.io.git cd hcyberphysical.github.io -
Install dependencies:
bundle install
-
Run the development server:
bundle exec jekyll serve -
View the site: Open your browser to
http://localhost:4000
.
โโโ _config.yml # Jekyll configuration
โโโ _layouts/ # Page layouts
โ โโโ default.html # Base layout
โ โโโ page.html # Standard page layout
โโโ _includes/ # Reusable components
โ โโโ header.html # Site header/navigation
โ โโโ footer.html # Site footer
โโโ _sass/ # SCSS partials (if needed)
โโโ assets/ # Static assets
โ โโโ css/ # Stylesheets
โ โโโ js/ # JavaScript files
โ โโโ images/ # Images (create this folder)
โโโ index.html # Homepage
โโโ services.md # Services page
โโโ about.md # About page
โโโ contact.md # Contact page
โโโ Gemfile # Ruby dependencies
Edit _config.yml to customize:
- Site title and description
- Email address
- Navigation menu
- Social media links
- URL settings
The main stylesheet is in assets/css/main.scss. Key variables at the top control:
- Colors (primary, secondary, accent)
- Typography
- Spacing
- Breakpoints
- Homepage: Edit
index.html - Pages: Edit the corresponding
.mdfiles in the root directory - Navigation: Update
_config.ymlunder thenavigationsection
The contact form uses Formspree. To set it up:
- Go to Formspree.io and create a free account
- Create a new form and copy the form ID
- Edit
contact.mdand replaceYOUR_FORM_IDwith your actual Formspree form ID:<form ... action="https://formspree.io/f/YOUR_FORM_ID" method="POST">
- Push your code to the
mainbranch - Go to your repository settings on GitHub
- Navigate to "Pages" in the left sidebar
- Under "Source", select "Deploy from a branch"
- Choose
mainbranch and/ (root)folder - Click Save
Your site will be available at https://hcyberphysical.github.io
-
Create a file named
CNAMEin the root directory with your domain:yourdomain.com www.yourdomain.com -
Configure DNS records with your domain provider:
- Type: CNAME
- Name: www (or @)
- Value: hcyberphysical.github.io
-
For the apex domain (without www), use A records:
- 185.199.108.153
- 185.199.109.153
- 185.199.110.153
- 185.199.111.153
-
GitHub will automatically provision SSL certificates
Note: A commented payment section placeholder was previously included in services.md but has been removed to keep the codebase clean. When ready to add payment processing, follow the instructions below.
To add payment options to your services page, you can add a new section after the "Interested in Our Services?" CTA section in services.md. Here are your options:
-
Create a Stripe account at stripe.com
-
Add Stripe.js to
_layouts/default.htmlin the<head>section:<script src="https://js.stripe.com/v3/"></script>
-
Add a payment section to
services.mdafter the services-cta section:<section class="payment-section"> <h3>Service Packages</h3> <div class="pricing-grid"> <div class="pricing-card"> <h4>Basic Package</h4> <p class="price">$299</p> <button class="btn btn-primary stripe-checkout" data-amount="29900" data-description="Basic Service Package"> Purchase Now </button> </div> <!-- Add more pricing cards as needed --> </div> </section>
-
Create a checkout handler in
assets/js/main.js:// Initialize Stripe with your publishable key const stripe = Stripe('YOUR_PUBLISHABLE_KEY'); // Handle checkout button clicks document.querySelectorAll('.stripe-checkout').forEach(button => { button.addEventListener('click', async () => { // You'll need a backend endpoint to create a checkout session // For now, this is a placeholder const response = await fetch('/create-checkout-session', { method: 'POST', body: JSON.stringify({ amount: button.dataset.amount, description: button.dataset.description }) }); // Redirect to Stripe Checkout }); });
-
For server-side processing, you'll need a backend (Rails API, serverless function, etc.) to:
- Create Stripe Checkout sessions
- Handle webhooks for payment confirmations
- Send receipts
- Manage orders
-
Create a PayPal Business account at paypal.com
-
Create PayPal buttons in your PayPal dashboard and get the hosted button IDs
-
Add a payment section to
services.md:<section class="payment-section"> <h3>Service Packages</h3> <div class="pricing-grid"> <div class="pricing-card"> <h4>Basic Package</h4> <p class="price">$299</p> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="YOUR_BUTTON_ID"> <input type="submit" value="Pay with PayPal" class="btn btn-primary"> </form> </div> </div> </section>
These services handle everything for you:
- Gumroad: Easy product sales and downloads - just embed their buy button
- Paddle: All-in-one payment and tax solution - great for international sales
- Lemon Squeezy: Modern payment platform with built-in tax handling
- Buy Me a Coffee: Simple payment buttons for services
Implementation: Most of these services provide embed codes that you can add directly to your HTML.
For a seamless experience without leaving your site:
- Use Stripe Elements to create custom payment forms
- Use PayPal Smart Buttons for inline PayPal checkout
- These require JavaScript integration but provide a better UX
- Backend Required: For full payment processing with webhooks, receipts, and order management, you'll need a backend service (Rails API, serverless functions like Vercel/Netlify Functions, etc.)
- GitHub Pages Limitation: GitHub Pages only serves static files, so you cannot process payments server-side directly. You'll need an external service or backend.
- Security: Never expose secret keys in your frontend code. Only use publishable/client keys in your JavaScript.
- Testing: Always test payment flows in sandbox/test mode before going live.
When ready to add downloadable products:
- Create releases in your repository
- Link to release assets directly
- Use authentication tokens for private downloads
- Upload files to cloud storage
- Generate signed URLs for secure downloads
- Track downloads via analytics
- Upload files to CDN
- Use CDN URLs for fast downloads
- Implement access control if needed
Create a downloads.md page:
---
layout: page
title: Downloads
---
<div class="downloads-grid">
<div class="download-item">
<h3>Product Name</h3>
<p>Description</p>
<a href="DOWNLOAD_URL" class="btn btn-primary">Download</a>
</div>
</div>- Edit the relevant
.mdor.htmlfiles - Test locally:
bundle exec jekyll serve - Commit and push changes
- GitHub Pages will automatically rebuild
-
Create a new
.mdfile in the root directory:--- layout: page title: New Page --- Your content here
-
Add to navigation in
_config.yml:navigation: - title: New Page url: /new-page
bundle updateThis site is designed to be maintainable by non-developers. Key principles:
- Clear structure: Files are organized logically
- Documentation: This README and inline comments
- Simple edits: Most content changes only require editing markdown files
- Version control: All changes are tracked in Git
- Text changes: Edit the
.mdfiles directly - Style changes: Edit
assets/css/main.scss(requires basic CSS knowledge) - New pages: Follow the pattern in existing
.mdfiles - Navigation: Update
_config.yml
- Change colors: Edit variables in
assets/css/main.scss - Add social links: Update
_config.ymlundersocial: - Update contact info: Edit
contact.mdand_config.yml - Add new service: Edit
services.md
- Check Jekyll documentation for technical issues
- Review GitHub Pages documentation for deployment issues
- Contact the original developer for site-specific questions
All rights reserved. ยฉ 2024 H Cyber Physical