Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

via.moe

A personalized minimalist URL shortening/jumping service.

Project Structure

  • index.html: The main landing page.
  • 404.html: Custom 404 error page.
  • lists.html: Template for displaying the list of URLs (dynamically generated).
  • style.css: All common CSS styles for the project.
  • _redirects: Defines the URL redirection rules.
  • build.js: A Node.js script to build the project.
  • public/: The output directory for the built project files.

Build Commands

This project uses a simple Node.js script to generate the lists.html page dynamically based on the entries in _redirects file, and then copies all necessary files to a public directory.

To build the project, run the following command in your terminal:

node build.js

This command will:

  1. Read the _redirects file.
  2. Dynamically generate the lists.html content with hyperlinks for each redirection rule.
  3. Create a public directory (if it doesn't exist).
  4. Output the generated lists.html and copy index.html, 404.html, style.css, _redirects, LICENSE, and vercel.json into the public directory.

Deployment on Cloudflare Pages

To deploy this project on Cloudflare Pages, follow these steps:

  1. Fork this repository (if you haven't already).
  2. Connect your Git repository to Cloudflare Pages.
  3. When configuring your build settings on Cloudflare Pages:
    • Build command: node build.js
    • Build output directory: public
  4. Save and Deploy Site.

Cloudflare Pages will automatically run the build.js script, generate the public directory, and deploy its contents.

Releases

Packages

Contributors

Languages