A personalized minimalist URL shortening/jumping service.
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.
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.jsThis command will:
- Read the
_redirectsfile. - Dynamically generate the
lists.htmlcontent with hyperlinks for each redirection rule. - Create a
publicdirectory (if it doesn't exist). - Output the generated
lists.htmland copyindex.html,404.html,style.css,_redirects,LICENSE, andvercel.jsoninto thepublicdirectory.
To deploy this project on Cloudflare Pages, follow these steps:
- Fork this repository (if you haven't already).
- Connect your Git repository to Cloudflare Pages.
- When configuring your build settings on Cloudflare Pages:
- Build command:
node build.js - Build output directory:
public
- Build command:
- Save and Deploy Site.
Cloudflare Pages will automatically run the build.js script, generate the public directory, and deploy its contents.