This is a personal homepage website that simulates a terminal interface, built with Node.js and Express. The website has the following features:
- Typewriter animation effect when entering the site
- Terminal window layout, simulating a real command-line experience
- Support for various commands, including displaying personal information, links, and hash values
- Article management system for adding and reading Markdown articles
- Command history feature, allowing browsing through previous commands using arrow keys
- Right-click paste and Ctrl+V/Cmd+V shortcut for pasting
- Footer displaying personal contact information
- Responsive design, adapting to different device screens
- Make sure you have Node.js installed (version 14.0.0 or higher recommended)
- Clone or download this repository
- Run the following command in the project root directory to install dependencies:
npm install- Start the development server:
npm run dev- Visit in your browser:
http://localhost:3000/main.html
In the terminal interface, you can use the following commands:
help- Display all available commandscat bio.txt- Display personal informationls -la links- List all personal linksopenssl sha256- Show cryptographic hash valuesclear- Clear terminal contentexit- Return to the welcome screengit push- Go to the personal homepage
In the actual terminal (not the web terminal), run:
npm run article "Your Article Title"This will create a new Markdown format article file in the articles directory.
In the web terminal, enter:
docs ls
This will display a list of all articles you've created.
After seeing the article list, enter the number in front of the article (1-5) to read the corresponding article.
If you have more than 5 articles, you can use the following commands to browse more:
next # Show next page of articles
prev # Show previous page of articles
npm run docs ls # List all articles
npm run docs view 1 # View article #1
npm run docs next # Next page
npm run docs prev # Previous page- Command History: Use the up and down arrow keys to browse through previously entered commands
- Paste Function: Right-click on the terminal or use Ctrl+V/Cmd+V shortcut to paste text
- Auto-scroll: The terminal automatically scrolls to the bottom after entering commands
You can customize the website content by editing the following files:
public/main.html- Modify the terminal interface and JavaScript codearticles/- Store all Markdown format articles
To deploy to a production environment, you can use the following command:
npm startThen deploy the application to your preferred hosting service, such as Heroku, Vercel, Netlify, etc.
- Node.js
- Express
- HTML5
- CSS3
- JavaScript (ES6+)
- LocalStorage (for storing command history)
- Markdown (for article formatting)
MIT