Git Product home page Git Product logo

zerops-starlight-ssg's Introduction

Built with Starlight

Starlight on Zerops - SSG

This is a template for deploying Astro's Starlight docs (SSG) to Zerops, along with a guide on how to deploy to Zerops using both their GUI and CLI.

πŸš€ Project Structure

Inside of your Astro + Starlight + Zerops project, you'll see the following folders and files:

.
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ content/
β”‚   β”‚   β”œβ”€β”€ docs/
β”‚   β”‚   └── config.ts
β”‚   └── env.d.ts
β”œβ”€β”€ astro.config.mjs
β”œβ”€β”€ package.json
β”œβ”€β”€ pnpm-lock.yaml
β”œβ”€β”€ tsconfig.json
└── zerops.yml

Starlight looks for .md or .mdx files in the src/content/docs/ directory. Each file is exposed as a route based on its file name.

Images can be added to src/assets/ and embedded in Markdown with a relative link.

Static assets, like favicons, can be placed in the public/ directory.

zerops.yml used for deploying to zerops via cli or gui.

Deploying Using Zerops Gui - Go to Zerops Dashboard

Importing in a new project

# You can remove the project parameter if you're importing 
# a service into an existing project instead of creating a 
# new one
project:
  name: zerops-nextjs

services:
  - hostname: starlight
    type: [email protected]
    nginxConfig: |-
      server {
          listen 80 default_server;
          listen [::]:80 default_server;

          server_name _;
          root /var/www;

          location / {
              try_files $uri $uri/ /index.html;
          }

          access_log syslog:server=unix:/dev/log,facility=local1 default_short;
          error_log syslog:server=unix:/dev/log,facility=local1;
      }
    buildFromGit: https://github.com/nermalcat69/zerops-starlight-ssg
    enableSubdomainAccess: true
    minContainers: 1

πŸ§‘β€πŸš€ Confused about how to import? Watch this video about how to import and setup a new project https://youtu.be/ZahXCIaUr_A !

To import into an existing project just go to the existing project and check the left sidebar to import a service(make sure that the project parameter in import yaml).

Deploying Using Zerops Cli - @zeropsio/zcli

Setting up the Project Locally

git clone https://github.com/nermalcat69/zerops-starlight
pnpm install
pnpm run build

Setting up Zerops yaml

zerops:
  - setup: starlight # Service hostname
    build:
      base: nodejs@18 # Technology used to build the app
      buildCommands: # Build commands
        - pnpm i
        - pnpm run build
      deploy: # Build artifacts deployed to the runtime
        - dist/~
      cache: # Cache for faster next round of build 
        - node_modules
        - pnpm-lock.yaml

Follow these commands to deploy a project to zerops.

Command Action
zcli login <token> Command to login to your zerops account using your token.
zcli push Command to push your codebase to a service (you need to have zerops.yml in your root directory).

πŸ‘¨β€πŸ’» Facing Issues while deploying?

If you still find yourself stuck in the process join Zerops Discord Server or Checkout Zerops Docs.

πŸ‘€ Want to learn more about Starlight?

Check out Starlight’s docs, read the Astro documentation, or jump into the Astro Discord server.

zerops-starlight-ssg's People

Contributors

nermalcat69 avatar

Stargazers

Pranshu Patel avatar Akul avatar BMO avatar  avatar  avatar

Watchers

AleΕ‘ avatar  avatar  avatar

zerops-starlight-ssg's Issues

🌿 Improve Readme

Ways you can improve it

  • Make it more readable and better
  • Try adding some badges

If you have can improve it in any way try working on it and do a pr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.