Description of oposum Skip to main content
djs404.me

post6-using 11ty for douglasjsmith404.com.

repo of this site:

opossum

Styled (with Syntax) #

Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.

// this is a command
function myCommand() {
	let counter = 0;
	counter++;
}

// Test with a line break above this line.
console.log('Test');
// this is a command
function myCommand() {
	let counter = 0;
	counter++;
}

and a line break above this line.

// Test with a line break above this line.
console.log('Test');

Section Header #

directions to set up a github.io static-site using simple app from svelte website.

Setting Up a GitHub.io Static Site with Svelte #

Here's how to create a simple Svelte app and deploy it as a static website on GitHub Pages:

1. Install Dependencies:

2. Create a Svelte Project:

Open your terminal and navigate to your desired project directory. Then, run this command to initialize a new SvelteKit project:

npx degit @sveltejs/kit my-sveltekit-app
cd my-sveltekit-app

Replace my-sveltekit-app with your preferred project name. This command uses degit to download the SvelteKit project template and sets up the initial project structure.

3. Develop Your App:

The src directory contains your Svelte components and pages. Here's a basic structure:

src/
  - App.svelte  (main layout component)
  - routes/
    - index.svelte  (homepage)
    - about.svelte  (about page)
  - ... (other components and pages)

4. Build for Deployment:

Once you're happy with your app, run this command to generate the optimized static website files:

pnpm build

This creates a new build directory containing the production-ready website files.

5. Create a .nojekyll file (optional):

If your project name conflicts with Jekyll configurations on GitHub Pages, create an empty file named .nojekyll inside the build directory. This prevents Jekyll from processing your website files.

6. Deploy to GitHub Pages:

There are two main ways to deploy your website:

Manual Deployment:

  1. Create a new repository on GitHub (or use an existing one).
  2. Create a new branch in your repository named gh-pages (or any other branch you prefer for deployment).
  3. Push the contents of your build directory to the gh-pages branch using Git commands or your preferred Git client.

GitHub Pages will automatically detect changes in the gh-pages branch and deploy your website to https://<username>.github.io (or your custom domain if configured).

CI/CD with GitHub Actions (optional):

This method involves setting up a workflow in GitHub Actions that automatically builds and deploys your website on push events. It requires additional configuration but allows for automated deployments. You can find tutorials online for setting up CI/CD with GitHub Actions for SvelteKit projects.

Resources: