By way of full disclosure, I have worked with a couple AIs to develop this guide. As with many technical tasks, your mileage may vary. In other words, I can’t guarantee anything about how well this will work when you are driving the build. My hope is that you will be blindingly successful. Having performed the requisite CYA (Cover Your A55) tasks, I wish you godspeed.
Introduction
This guide will walk you through creating a simple website for sharing downloadable PDFs and other files using free and open-source tools. No prior coding experience is required!
Table of Contents
- Choosing Your Platform
- Setting Up GitHub Pages
- Creating Your Website Structure
- Adding Your Files
- Styling Your Website
- Testing and Going Live
- Alternative Options
- Maintenance and Updates
- Troubleshooting
Choosing Your Platform
For a free, reliable file-sharing website, we’ll use GitHub Pages. It’s completely free, doesn’t require server management, and works well for file sharing (with some size limitations).
Why GitHub Pages?
- Completely free with no hosting costs
- No server maintenance required
- Built-in version control
- Custom domain support (optional)
- Reasonable file size limits (100MB per file, 1GB repository limit)
Setting Up GitHub Pages
Step 1: Create a GitHub Account
- Go to GitHub.com
- Click “Sign up” and follow the registration process
- Verify your email address when prompted
Step 2: Create a New Repository
- After logging in, click the “+” icon in the upper right corner
- Select “New repository”
- Name your repository:
yourusername.github.io
(replace “yourusername” with your actual GitHub username) - Make sure it’s set to “Public”
- Check the box for “Add a README file”
- Click “Create repository”
Step 3: Enable GitHub Pages
- Go to your new repository
- Click on “Settings” (tab near the top right)
- Scroll down to “Pages” in the left sidebar
- Under “Source”, select “Deploy from a branch”
- Select the “main” branch and “/ (root)” folder
- Click “Save”
- Wait a few minutes for GitHub to set up your site
Your site will now be accessible at https://yourusername.github.io
Creating Your Website Structure
Step 1: Understanding the Basic Structure
Your website will need these basic files:
index.html
(homepage)styles.css
(for styling)/files
(folder for your downloadable content)
Step 2: Create the Homepage
- In your repository, click “Add file” > “Create new file”
- Name it
index.html
- Copy and paste this basic HTML template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My File Sharing Site</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>My File Sharing Site</h1>
<p>A collection of downloadable resources</p>
</header>
<main>
<section class="file-list">
<h2>Available Files</h2>
<ul>
<!-- File links will go here -->
</ul>
</section>
</main>
<footer>
<p>Created with GitHub Pages</p>
</footer>
</body>
</html>
- Click “Commit new file” at the bottom
Step 3: Create a CSS File
- Click “Add file” > “Create new file” again
- Name it
styles.css
- Copy and paste this basic CSS:
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 40px;
padding: 20px;
background-color: #f5f5f5;
border-radius: 5px;
}
h1 {
margin-bottom: 10px;
color: #2c3e50;
}
h2 {
margin-bottom: 20px;
color: #2c3e50;
}
.file-list {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.file-item {
margin-bottom: 15px;
padding: 15px;
background-color: #f9f9f9;
border-radius: 5px;
transition: transform 0.2s;
}
.file-item:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.file-item a {
color: #3498db;
text-decoration: none;
font-weight: bold;
}
.file-item a:hover {
text-decoration: underline;
}
.file-description {
margin-top: 5px;
font-size: 0.9em;
color: #666;
}
footer {
margin-top: 40px;
text-align: center;
color: #7f8c8d;
font-size: 0.9em;
}
- Click “Commit new file”
Adding Your Files
Step 1: Create a Files Directory
- Click “Add file” > “Create new file”
- Name it
files/.gitkeep
(this creates a folder named “files”) - Click “Commit new file”
Step 2: Upload Your Files
- Navigate to the files folder by clicking on it
- Click “Add file” > “Upload files”
- Drag and drop your PDFs or other files (remember 100MB limit per file)
- Click “Commit changes”
Step 3: Add File Links to Your Homepage
- Go back to your repository root
- Click on
index.html
and then the pencil icon to edit - Find the
<ul>
tag, and add list items for each file like this:
<ul>
<li class="file-item">
<a href="files/example1.pdf" download>Example PDF Document</a>
<p class="file-description">A sample PDF document about topics ABC (1.2 MB)</p>
</li>
<li class="file-item">
<a href="files/example2.docx" download>Example Word Document</a>
<p class="file-description">A sample Word document about topics XYZ (843 KB)</p>
</li>
<!-- Add more items as needed -->
</ul>
- Replace the filenames and descriptions with your actual files
- Click “Commit changes”
Styling Your Website
Basic Customization
- Edit
styles.css
to change colors, fonts, and layout - Some simple changes you might make:
- Change
background-color
values for different sections - Adjust
font-family
for different text styles - Modify
color
values for text colors
- Change
Adding a Simple Search Function
If you’d like to add a basic search function:
- Edit
index.html
and add this before your file list:
<div class="search-container">
<input type="text" id="fileSearch" placeholder="Search for files...">
</div>
- Add this JavaScript at the end of your HTML file (before the closing
</body>
tag):
<script>
document.getElementById('fileSearch').addEventListener('keyup', function() {
let searchTerm = this.value.toLowerCase();
let fileItems = document.querySelectorAll('.file-item');
fileItems.forEach(function(item) {
let text = item.textContent.toLowerCase();
if(text.includes(searchTerm)) {
item.style.display = 'block';
} else {
item.style.display = 'none';
}
});
});
</script>
- Update your CSS to style the search box:
.search-container {
margin-bottom: 20px;
}
#fileSearch {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
}
Testing and Going Live
Step 1: Visit Your Website
- Go to
https://yourusername.github.io
to see your live site - Note: Changes may take a few minutes to appear after committing
Step 2: Test All Downloads
- Click each file link to ensure downloads work correctly
- Test on different devices (mobile, tablet, desktop)
Step 3: Share Your URL
Your site is now live! Share the URL with anyone who needs access to your files.
Alternative Options
If GitHub Pages doesn’t meet your needs, consider these alternatives:
Netlify Drop
- Go to Netlify Drop
- Drag and drop your website folder
- Get an instant website with a random URL
- Upgrade for a custom domain (optional)
Google Drive + Website
- Upload files to Google Drive
- Create shareable links for each file
- Build a simple website with those links
GitLab Pages
Similar to GitHub Pages but with larger file size limits.
Maintenance and Updates
Adding New Files
- Upload new files to the
files
folder - Update
index.html
with new file links - Commit your changes
Removing Files
- Delete the file from the repository
- Remove the corresponding link from
index.html
- Commit your changes
Tracking Downloads
For basic download tracking:
- Sign up for a free Google Analytics account
- Add the tracking code to your
index.html
- Set up event tracking for downloads
Troubleshooting
Common Issues and Solutions
Files Not Showing Up
- Ensure paths are correct (e.g.,
files/document.pdf
) - Check for case sensitivity in filenames
- Verify files were successfully uploaded
Website Not Updating
- Wait 5-10 minutes for changes to propagate
- Check if you committed your changes
- Verify you’re using the correct repository
File Too Large
- GitHub has a 100MB file limit
- Split large files into smaller parts
- Consider using Git LFS (Large File Storage) for larger files
Need More Space
- GitHub repositories have a 1GB soft limit
- Create multiple repositories for more storage
- Consider alternative platforms for very large files
With this guide, you should be able to create a simple but effective file-sharing website completely free. The advantage of this approach is that it requires minimal technical knowledge while providing a professional-looking result.
This content is free to use, adapt, and share.
Knowledge should be open—spread it far and wide.
Remember, like with all of my work, I am able to provide the following assurance(s):
- It is almost certainly going to work until it breaks; although I have to admit it may never work and that would be sad.
- When/if it does break, you may keep all of the pieces.
- If you find my materials helpful, both you & I will be happy, at least for a little while.
- My advice is worth every penny you paid for it!
Discover more from eirenicon llc
Subscribe to get the latest posts sent to your email.