Skip to content

Commit 696df99

Browse files
committed
Updating Doccs
1 parent 38c907d commit 696df99

File tree

2 files changed

+161
-1
lines changed

2 files changed

+161
-1
lines changed

README.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# TextHub
2+
3+
A modern, responsive web application built with Blazor WebAssembly that provides quick and simple text utilities. TextHub offers a comprehensive suite of text manipulation tools including case conversion, word counting, and text formatting.
4+
5+
6+
## 🚀 Live Demo
7+
8+
Visit the live application at: [https://codefrydev.in/TextHub/](https://codefrydev.in/TextHub/)
9+
10+
## 🛠️ Technology Stack
11+
12+
- **Frontend**: Blazor WebAssembly (.NET 9.0)
13+
- **Styling**: Tailwind CSS
14+
- **Icons**: Lucide Icons
15+
- **Deployment**: GitHub Pages
16+
- **CI/CD**: GitHub Actions
17+
18+
## 🚀 Getting Started
19+
20+
### Prerequisites
21+
22+
- .NET 9.0 SDK
23+
- Visual Studio 2022 or VS Code with C# extension
24+
25+
### Installation
26+
27+
1. **Clone the repository**
28+
```bash
29+
git clone https://github.com/yourusername/TextHub.git
30+
cd TextHub
31+
```
32+
33+
2. **Restore dependencies**
34+
```bash
35+
dotnet restore
36+
```
37+
38+
3. **Run the application**
39+
```bash
40+
dotnet run --project TextHub/TextHub.csproj
41+
```
42+
43+
4. **Open your browser**
44+
Navigate to `https://localhost:5001` (or the URL shown in the terminal)
45+
46+
## 🚀 Deployment
47+
48+
The application is automatically deployed to GitHub Pages using GitHub Actions. The deployment workflow:
49+
50+
1. Builds the Blazor WebAssembly application
51+
2. Changes the base href from `/` to `/TextHub/` for GitHub Pages
52+
3. Creates a 404.html file for SPA fallback
53+
4. Deploys to the `gh-pages` branch
54+
55+
### Manual Deployment
56+
57+
To deploy manually:
58+
59+
```bash
60+
dotnet publish TextHub/TextHub.csproj -c Release -o release
61+
# The release folder contains the deployable files
62+
```
63+
64+
## 🐛 Common Issues & Solutions
65+
66+
### Issue: 404 Errors on Direct URL Access
67+
68+
**Problem**: When you use `/uppercase` for navigation not work as expected
69+
70+
Example :
71+
=> website is hoisted on `codefrydev.in/TetxHub`
72+
73+
=> With `/uppercase` it will got to `codefrydev.in/uppercase` which causes issue
74+
=> With `oppercase` it will go to 'codefrydev.in/TextHub/uppercase`
75+
76+
**Solution**:
77+
1. **Fixed Navigation Links**: Removed leading slashes from all tool links in `ToolDataService.cs`
78+
```csharp
79+
// Before (causing 404s)
80+
new Tool("Uppercase Converter", "Convert any text to UPPERCASE instantly", "/uppercase", "...")
81+
82+
// After (working correctly)
83+
new Tool("Uppercase Converter", "Convert any text to UPPERCASE instantly", "uppercase", "...")
84+
```
85+
86+
2. **Fixed Navigation Bar**: Updated all navigation links to use relative paths
87+
```html
88+
<!-- Before -->
89+
<a href="/">Text Hub</a>
90+
<a href="/uppercase">Uppercase</a>
91+
92+
<!-- After -->
93+
<a href="">Text Hub</a>
94+
<a href="uppercase">Uppercase</a>
95+
```
96+
97+
3. **Deployment Configuration**: The deployment workflow automatically:
98+
- Changes base href to `/TextHub/` for GitHub Pages
99+
- Creates a 404.html file for SPA fallback
100+
- Ensures relative links resolve correctly
101+
102+
### Issue: Links Not Working After Deployment
103+
104+
**Problem**: Tool cards and navigation links don't work after deploying to GitHub Pages.
105+
106+
**Solution**: Ensure all links use relative paths instead of absolute paths. The base href configuration in the deployment handles the rest.
107+
108+
## 🎨 Customization
109+
110+
### Adding New Tools
111+
112+
1. **Create the Razor component** in the appropriate `Features/` folder
113+
2. **Add the route** using `@page "/tool-name"`
114+
3. **Update ToolDataService.cs** to include the new tool
115+
4. **Add the tool to the appropriate section** (TextCase, TextAnalysis, or TextFormatting)
116+
117+
Example:
118+
```csharp
119+
// In ToolDataService.cs
120+
new Tool("New Tool", "Description of the new tool", "new-tool", "<svg>...</svg>")
121+
```
122+
123+
### Styling
124+
125+
The application uses Tailwind CSS for styling. Key customization points:
126+
127+
- **Colors**: Defined in `wwwroot/index.html` in the Tailwind config
128+
- **Components**: Styled using Tailwind classes
129+
- **Animations**: Custom animations defined in the CSS
130+
131+
## 🤝 Contributing
132+
133+
1. Fork the repository
134+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
135+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
136+
4. Push to the branch (`git push origin feature/amazing-feature`)
137+
5. Open a Pull Request
138+
139+
## 📝 License
140+
141+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
142+
143+
## 🙏 Acknowledgments
144+
145+
- [Blazor](https://blazor.net/) for the web framework
146+
- [Tailwind CSS](https://tailwindcss.com/) for styling
147+
- [Lucide Icons](https://lucide.dev/) for beautiful icons
148+
- [GitHub Pages](https://pages.github.com/) for hosting
149+
150+
## 📞 Support
151+
152+
If you encounter any issues or have questions, please:
153+
154+
1. Check the [Common Issues & Solutions](#-common-issues--solutions) section
155+
2. Search existing [GitHub Issues](https://github.com/codefrydev/TextHub/issues)
156+
3. Create a new issue if your problem isn't already documented
157+
158+
---
159+
160+
**Made with ❤️ using Blazor WebAssembly**

TextHub/Components/Shared/TextCaseToolsSection.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@using TextHub.Services
22
@inject ToolDataService ToolDataService
33

4-
<section class="pb-12 md:pb-20 px-4" id="#tools">
4+
<section class="pb-12 md:pb-20 px-4" id="tools">
55
<div class="container mx-auto max-w-7xl">
66
<div class="mb-12 md:mb-16 animate-fade-in" style="animation-delay: 0ms;">
77
<SectionHeader

0 commit comments

Comments
 (0)