-
Notifications
You must be signed in to change notification settings - Fork 84
Contributing
Thank you for your interest in contributing to Markdown Viewer! We welcome contributions, including bug reports, feature requests, documentation improvements, and code updates.
- Code of Conduct
- Reporting Bugs & Issues
- Security Disclosures
- Development Setup
- Code Style Guidelines
- Commit Message Conventions
- Pull Request & Code Review Process
- Repository Structure
By participating in this project, you agree to maintain a respectful, professional, and inclusive environment. Please be kind and constructive in all communication and code reviews.
- Search the GitHub Issue Tracker to verify the bug has not already been reported.
- If it is a new bug, open an issue including:
- A clear, descriptive title.
- Detailed steps to reproduce the bug.
- Expected vs. actual behavior.
- Your operating system and browser versions.
- Any relevant screenshots or console error messages.
If you discover a security vulnerability, please report it responsibly:
- Do not open a public issue.
- Submit a private advisory via GitHub Security Advisories if enabled for the repository.
- Alternatively, contact the project maintainers directly with details of the vulnerability and a minimal reproduction.
The core web app requires no build step. To serve index.html on localhost (127.0.0.1) and run it locally:
- Clone the repository:
git clone https://github.com/ThisIs-Developer/Markdown-Viewer.git cd Markdown-Viewer - Serve the root directory using a local web server:
# Serve with Python (built-in, no dependencies) python3 -m http.server 8080 # or # Serve with Node.js serve npx serve . -p 8080
- Open http://localhost:8080 or http://127.0.0.1:8080 in your browser and edit files like
index.html,script.js, orstyles.css.
To set up the NeutralinoJS desktop environment:
- Navigate to the desktop directory:
cd Markdown-Viewer/desktop-app - Install dependencies:
npm install
- Download the Neutralino runtime binaries:
node setup-binaries.js
- Copy the latest frontend assets into the desktop directory:
node prepare.js
- Start the app in development mode with hot-reload:
npm run dev
- Use 2-space indentation.
- Write semantic HTML5 tags (
<header>,<main>,<section>, etc.) and ensure they are nested correctly. - Include
aria-*attributes and roles to maintain accessibility. - Do not write inline CSS styles; place all styles in
styles.css.
- Use 2-space indentation.
- Use CSS variables (custom properties) on
:rootand[data-theme="dark"]to manage colors, borders, and margins. - Scope transitions to specific properties (e.g.
transition: background-color 0.2s) to avoid repainting the entire viewport during theme switches. - Group style sheets logically using clear comments (e.g.
/* --- Editor Layout --- */).
- Use 2-space indentation and insert semicolons.
- Use Vanilla ES6 JavaScript without external frameworks.
- Use
constfor constant references andletfor variables. Do not usevar. - Offload CPU-intensive parsing or formatting logic to the Web Worker (
preview-worker.js) to keep the main UI thread responsive. - Debounce event handlers that trigger rendering or layout calculations.
We use the Conventional Commits standard to organize project changes. Commit messages must use the following format:
<type>(<scope>): <description>
[body]
[footer]
-
feat: A new user-facing feature. -
fix: A bug fix. -
docs: Changes to documentation files (such as the wiki or README). -
style: Formatting updates (whitespace, semicolons) that do not affect code logic. -
refactor: Code restructuring that neither fixes a bug nor adds a feature. -
perf: Performance-related optimizations. -
chore: Tasks like updating dependencies, build configurations, or CI files.
feat(editor): add keyboard shortcut for fullscreen modefix(pdf): correct page breaks in long tablesdocs(wiki): add Mermaid diagrams formatting guidechore(deps): update marked.js version to 9.1.6
- Fork the repository and create a new feature branch from
main:git checkout -b feature/my-feature-name
- Make your changes, verify your code style, and test them across modern browsers (Chrome, Firefox, Safari, Edge).
- Commit your updates following the Commit Message Conventions.
- Rebase your branch to ensure it is up to date with the upstream
mainbranch before submitting:git fetch upstream git rebase upstream/main
- Open a Pull Request pointing to the upstream repository's
mainbranch. Complete the pull request template with details of the changes and any related issues. - A project maintainer will review your pull request. Please address any review comments before the code is merged. Once approved, the pull request will be squash-merged.
Below is an overview of the key folders and files in the repository:
-
index.html: The entry-point HTML page. -
script.js: The main controller and UI interaction script. -
preview-worker.js: The background Web Worker script that compiles Markdown. -
styles.css: CSS styles and themes. -
sw.js: The Service Worker cache proxy script. -
Dockerfile/docker-compose.yml: Docker configuration files. -
assets/: Image assets and diagrams. -
wiki/: Document source files for this wiki. -
desktop-app/: NeutralinoJS application source files.
Markdown Viewer Repository · Apache-2.0 License
Developed and maintained by ThisIs-Developer
📖 Overview & Reference
🚀 Getting Started & Usage
🐳 Deployment & Wrappers
🛠️ Development & Journey