Welcome
SimpleDir lets you create a directory-style website without writing an entire website from scratch. Add text, image slideshows, folders, and dividers to organize your content. I tried making this as stupidly simple as possible.
Use it for a personal page, a collection of links, a project index, a resource directory, or an archive.
libraryData
and leave the surrounding template code intact.
Getting started
- Open the SimpleDir repository on GitHub.
- Open the template HTML file.
- Scroll until you find the wall of red ❌ boundary comments.
- Write or paste your entries inside the
libraryDataobject. - Save your finished copy as
index.html. - Publish it with GitHub Pages or Vercel.
const libraryData = {, its closing
};, and the boundary comments. Only replace or add
the directory entries in the designated area.
Text page
Create an entry that displays text.
{
title: "About Me",
type: "text",
content: "Hello! Welcome to my website."
},
Change the title and content to your own.
Image page
The slideshow type can display an image. A single-slide slideshow can be used when you want one image in an entry.
{
title: "My Image",
type: "slideshow",
slides: [
{
image: "https://example.com/image.jpg"
}
]
},
Replace the example URL with a URL to your image.
Text slideshow
Use multiple slides to show messages one at a time.
{
title: "My Messages",
type: "slideshow",
slides: [
{ text: "Welcome!" },
{ text: "Thanks for visiting." },
{ text: "Have a great day!" }
]
},
Image slideshow
Use multiple images in a single slideshow.
{
title: "My Photos",
type: "slideshow",
slides: [
{ image: "https://example.com/photo1.jpg" },
{ image: "https://example.com/photo2.jpg" },
{ image: "https://example.com/photo3.jpg" }
]
},
Mixed slideshow
A slide can contain text, an image, or both. This lets you combine captions and pictures in the same slideshow.
{
title: "My Collection",
type: "slideshow",
slides: [
{
text: "This is my first slide."
},
{
image: "https://example.com/photo.jpg",
text: "A photo with a caption."
}
]
},
Folder
A folder groups other entries inside it.
{
title: "My Folder",
type: "folder",
items: [
{
title: "First Page",
type: "text",
content: "This is inside the folder."
},
{
title: "Second Page",
type: "text",
content: "This is another page."
}
]
},
Nested folder
Folders can contain other folders.
{
title: "Main Folder",
type: "folder",
items: [
{
title: "Subfolder",
type: "folder",
items: [
{
title: "Inside the Subfolder",
type: "text",
content: "You found the nested page!"
}
]
}
]
},
Dividers
A divider is an entry in libraryData, rather than
simply a line of HTML added outside the directory data.
The template may use its content field when displaying
the divider.
{
type: "divider",
content: "My section divider"
},
content field if it is present
in your template's examples. Its precise display behavior depends
on the template's rendering code.
Publish with GitHub Pages
GitHub Pages can host a static HTML website for free.
Step 1: Open the SimpleDir template
Open blankpage.html ↗ and copy it into your code editor.
Step 2: Find the red ❌ boundaries
Scroll through the file until you find the wall of red ❌ comments. They mark the part of the template intended for your code. It is easy to spot when scrolling fast.
/* ❌❌❌ DO NOT EDIT ABOVE HERE!! ❌❌❌ */
const libraryData = {
hi :D
};
/* ❌❌❌ DO NOT EDIT BELOW HERE!! ❌❌❌ */
const libraryData = { line,
the closing };, or the boundary comments. Put your
entries inside the braces.
Step 3: Add your entries
Copy an example from this documentation and place it inside
libraryData. When adding several entries, separate
them with commas as required by JavaScript.
Step 4: Save as index.html
Save your finished file as index.html. This is the
standard entry filename for a basic static website.
Step 5: Create a repository
- Sign in to GitHub.
- Create a new repository for your website.
- Upload
index.htmlto the repository's root folder. - Commit the file.
Step 6: Enable GitHub Pages
- Open your website repository.
- Go to Settings.
- Choose Pages in the sidebar.
- Under the build and deployment options, choose deployment from a branch if prompted.
- Select the
mainbranch and/(root). - Click Save.
Step 7: Open your website
After GitHub Pages publishes the site, the Pages settings will show the published address. Open it to check your website.
Publish with Vercel
Vercel is another service that can host a static HTML website. Importing a GitHub repository is usually the easiest workflow.
Option A: Import from GitHub
- Save your website as
index.html. - Upload the file to a GitHub repository and commit it.
- Open Vercel.
- Choose the option to add a new project.
- Import your GitHub repository.
- Follow the project setup instructions.
- Deploy and open the URL Vercel provides.
Option B: Use a supported deployment workflow
- Make sure your file is named
index.html. - Check Vercel's current deployment options and documentation.
- Use a supported CLI or deployment workflow for the folder containing your HTML file.
- Open the deployed URL.
Free custom domains and subdomains
You do not always need to pay for a domain to give your website a memorable address. Some providers offer free subdomains that you can connect to your published website.
Free subdomain examples
-
Devs.Surf ↗
— depending on availability and provider rules, an address
could look like
yourname.devs.surf. -
LGBT.SH ↗
— depending on availability and provider rules, an address
could look like
yourname.lgbt.sh.
yourname.devs.surf is provided
under the parent domain devs.surf. You do not own
the parent domain, and your continued use depends on the provider's
terms and policies.
Step 1: Publish your website
Publish your SimpleDir site using GitHub Pages or Vercel first. Check that the platform-provided website address works.
Step 2: Register a free subdomain
Visit a provider that offers free subdomains, check whether your preferred name is available, and review its DNS options and terms.
Step 3: Add the domain to your hosting project
Open the custom-domain settings for your GitHub Pages or Vercel project and enter the subdomain you registered.
Step 4: Configure DNS
In the subdomain provider's DNS settings, add the records requested by your hosting service. The exact records depend on your hosting provider and domain configuration.
Step 5: Verify and test
Wait for the DNS changes to take effect, complete any domain verification steps, and test the new address. Enable HTTPS if your hosting provider offers it for the domain.
Do I need to buy a domain?
No. You can use the free address provided by GitHub Pages or Vercel, or connect a free subdomain if its provider supports your hosting setup. Buying your own domain is optional.
Important notes
- Use
index.htmlas the entry filename for a basic static website. - Keep the
libraryDatadeclaration and its closing braces intact. - Separate entries with commas wherever JavaScript syntax requires them.
- Use valid image URLs for slideshow images.
BASE64:is only for making the ai po po not snipe controversial info.- Never put passwords, private keys, or sensitive information in public website source code.
- Refer to the actual template when you need to confirm the exact behavior of a field.