Skip to content

Commit 75ef2e2

Browse files
committed
Init draft
1 parent 2044f48 commit 75ef2e2

17 files changed

+8696
-2
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github: doctorlai
2+
patreon: doctorlai
3+
buy_me_a_coffee: y0BtG5R
4+
thanks_dev: doctorlai

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ci.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Markdown-HTML-Converter (Built, Lint and Test)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
# Set up Node.js
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '18'
24+
25+
# Cache node_modules
26+
- name: Cache node modules
27+
uses: actions/cache@v3
28+
with:
29+
path: ~/.npm
30+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
31+
restore-keys: |
32+
${{ runner.os }}-node-
33+
34+
# Install dependencies
35+
- name: Install dependencies
36+
run: npm install --legacy-peer-deps
37+
38+
# Run Prettier (Linting)
39+
- name: Run Prettier
40+
run: npm run format
41+
42+
# Run tests
43+
- name: Run tests
44+
run: npm run test
45+
env:
46+
CI: true
47+
NODE_OPTIONS: --enable-source-maps --max-old-space-size=4096
48+
49+
# Build the project
50+
- name: Build the project
51+
run: npm run build

README.md

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,77 @@
1-
# markdown-html-converter
2-
A Simple Markdown to HTML Converter in React Javascript
1+
# Markdown to HTML Converter
2+
A simple web-based tool to convert Markdown to JSON. This app is built using React and runs in the browser. It provides an easy-to-use interface with two text areas, where you can paste your Markdown source (left) and convert it to HTML (right).
3+
4+
## Features
5+
6+
- **Markdown to HTML Conversion**: Convert Markdown to HTML.
7+
- **Dark Mode**: Toggle between light and dark modes for better readability.
8+
- **Tab Support**: Properly inserts spaces when pressing the "Tab" key inside text areas.
9+
- **Simple and Intuitive UI**: Easy to use with a clean interface.
10+
- **Deploy Easily**: `npm run build` and `npm run deploy`
11+
12+
## Live Demo
13+
14+
You can try the live demo of this tool at [Github Page: Markdown-to-HTML Converter](https://doctorlai.github.io/markdown-html-converter/)
15+
16+
## Installation
17+
18+
To run the tool locally:
19+
20+
1. Clone the repository:
21+
```bash
22+
git clone https://github.com/doctorlai/markdown-html-converter.git
23+
cd markdown-html-converter
24+
```
25+
26+
2. Install dependencies:
27+
```bash
28+
npm install
29+
```
30+
31+
3. Start the development server:
32+
```bash
33+
npm run dev
34+
```
35+
36+
4. Tests:
37+
```bash
38+
npm run test
39+
```
40+
41+
5. Format Code:
42+
Use `prettier --check` or `prettier --write` to check or format the code.
43+
```bash
44+
npm run format
45+
```
46+
47+
6. Visit [http://localhost:5173/markdown-html-converter/](http://localhost:5173/markdown-html-converter/) to start using the tool locally.
48+
49+
## Usage
50+
51+
1. **Enter Markdown source** in the Markdown input box.
52+
2. **Click "Convert →"** to convert the Markdown to HTML.
53+
54+
You can also switch between **Light Mode** and **Dark Mode** by clicking the button on the top right corner.
55+
56+
## Contributing
57+
58+
Feel free to fork this project and submit issues or pull requests for improvements!
59+
60+
1. Fork the repository.
61+
2. Create a feature branch: `git checkout -b feature-branch`.
62+
3. Commit your changes: `git commit -am 'Add new feature'`.
63+
4. Push to the branch: `git push origin feature-branch`.
64+
5. Open a pull request.
65+
66+
## License
67+
68+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
69+
70+
## Documentation
71+
Here is the [AI generated wiki](https://deepwiki.com/DoctorLai/markdown-html-converter)
72+
73+
## Acknowledgments
74+
75+
- Built with ❤️ by [@justyy](https://github.com/doctorlai).
76+
- Initial Boilerplate code contributed by ChatGPT-4o and o4-mini.
77+
- If you found this tool useful, consider buying me a [coffee](https://justyy.com/out/bmc).

babel.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
presets: [
3+
'@babel/preset-env', // For modern JavaScript features
4+
'@babel/preset-react', // For React/JSX support
5+
],
6+
};
7+

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Markdown to HTML Converter</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta name="description" content="A simple Markdown to HTML converter built with React Javascript." />
8+
<meta name="keywords" content="Markdown, HTML, converter, React Javascript, web app" />
9+
</head>
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/main.jsx"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)