In Essepage, website URLs are defined by folders and page files inside the /public folder.
The path of the folder containing a page file becomes the URL of the corresponding web page. This allows you to see the entire page structure of your website in the file explorer without creating a separate routing configuration file.
For example, consider the following file structure:
/public
├── +page.essepage
├── about
│ └── +page.essepage
└── contact
└── +page.essepageEach page corresponds to the following URL:
| Page file | URL |
|---|---|
/public/+page.essepage | / |
/public/about/+page.essepage | /about |
/public/contact/+page.essepage | /contact |
The /public Folder: Where Your Website Begins
Web pages that visitors can access are organized around the project’s /public folder.
The default homepage file is:
/public/+page.essepageThis file is the homepage displayed when someone visits the project’s default site URL.
For example, if the project’s default site URL is:
https://espg.dev/my-websiteThe homepage URL is also:
https://espg.dev/my-websiteNeither /public nor +page.essepage appears in the URL.
The
/publicfolder is the starting point of your website, and its folder structure determines page URLs.
The Default Page File: +page.essepage
To create a standard web page in Essepage, use a file named +page.essepage.
+page.essepageWhen creating a new page file, enter +page as the file name and press Enter. The editor automatically adds the .essepage extension.
The completed file name is:
+page.essepageThe name +page.essepage does not appear in the URL. Instead, the path of the folder containing the file becomes the URL.
/public/about/+page.essepageIn this example, the about folder determines the URL:
/aboutTo change the page URL, change the name or location of the folder containing +page.essepage, rather than renaming the page file itself.
+page.essepageidentifies a page, while the folder name determines its URL.
Creating a New Page
Let’s create a new page in addition to the homepage.
Suppose you want to create an About page at:
/aboutYou need the following file structure:
/public
├── +page.essepage
└── about
└── +page.essepageCreating a Folder
- Right-click the
/publicfolder in the file explorer. - Select New Folder.
- Enter
aboutas the folder name and press Enter.
The following folder is now created inside /public:
/public/aboutCreating a Page File
- Right-click the new
/public/aboutfolder. - Select New File.
- Enter
+pageas the file name and press Enter. - Open the generated
+page.essepagefile. - Add the following content:
<h1>About Us</h1>
<p>Learn more about our website.</p>- Save the file.
The completed file path is:
/public/about/+page.essepageOnce this page is published, it can be accessed at the /about path of your site.
Publishing and Checking the Page
The new +page.essepage file has not been published yet. A new page must be published before you can open it in Preview or view it on the public site.
- Make sure the new
+page.essepagefile is saved. - Right-click the file.
- Select Publish.
- When publishing is complete, right-click the file again.
- Select Preview to check the page in the development environment.
- Select Open Page to check the published page.
To learn more about saving and publishing, see Save, Publish, and Apply.
Folder Structure and URLs
When you create multiple levels of folders under /public, the URL follows the same order.
For example, suppose you create a page for new products using the following structure:
/public
└── products
└── new
└── +page.essepageThe page URL is:
/products/newYou can add more pages using the same structure.
/public
├── +page.essepage
├── about
│ └── +page.essepage
├── products
│ ├── +page.essepage
│ ├── new
│ │ └── +page.essepage
│ └── popular
│ └── +page.essepage
└── contact
└── +page.essepageEach page corresponds to the following URL:
| Page file | URL |
|---|---|
/public/+page.essepage | / |
/public/about/+page.essepage | /about |
/public/products/+page.essepage | /products |
/public/products/new/+page.essepage | /products/new |
/public/products/popular/+page.essepage | /products/popular |
/public/contact/+page.essepage | /contact |
By looking at the folder structure in the file explorer, you can see which pages and URLs exist on the site.
Naming Files and Folders
You can choose file and folder names freely as long as they follow the naming rules.
Because page folder names become part of the URL, it is best to use short, descriptive names that reflect the page content.
Unicode characters such as Korean characters, Chinese characters, Japanese characters, and emoji can also be used in file and folder names.
For detailed naming rules, see File Naming Rules.
Renaming Files and Folders
You can rename files and folders in the file explorer.
- Right-click the file or folder you want to rename.
- Select Rename.
- Enter the new name and press Enter.
Renaming a folder that contains a page file also changes the URL of that page.
For example, consider the following page:
/public/about/+page.essepageIf you rename the about folder to company, the page path changes to:
/companyMoving Files and Folders
You can move files and folders into another folder by dragging and dropping them.
If you move a page file or the folder containing it and its path changes, the page URL also changes.
For example, consider the following page:
/public/about/+page.essepageIf you move the about folder into a company folder, the file structure becomes:
/public/company/about/+page.essepageThe page path also changes to:
/company/aboutIf you rename or move the folder of a published page, check that the page opens correctly at its new URL. You must also update menus and links that use the previous URL.
Deleting Files and Folders
You can delete files and folders that are no longer needed from the file explorer.
- Right-click the file or folder you want to delete.
- Select Delete.
Before deleting a file or folder, check whether:
- It is used by a page on the public site
- Other pages link to it
- A layout or component uses it
- A CSS, JavaScript, or image file is connected to a page
- The folder contains any other files you still need
Deleting a folder also deletes all of its subfolders and files. Check the target carefully before deleting it.
Renaming or moving a folder that contains a published page changes its URL. Deleting a page file or a folder containing a page makes the previous URL unavailable.
When a Page Cannot Be Found
If a new page does not open or its URL is different from what you expected, check the following:
- The page file is inside the
/publicfolder - The file name is exactly
+page.essepage - The page file is inside the intended folder
- The page has been published for the first time
- The page is not hidden from the public site
- The folder name entered in the browser matches the actual folder name
- The capitalization of file and folder names matches
For example, if the published site URL is https://espg.dev/my-website, the URL for the following file:
/public/products/new/+page.essepageIs:
https://espg.dev/my-website/products/newDo not include /public or +page.essepage in the URL.
Next Steps
Now that you understand how to create pages and URLs, continue with the following guides:
- Learn about the contents and basic structure of a page file: Page Structure
- Connect pages with menus and links: Navigation and Links
- Create pages that use part of the URL as a value: Parameter Folders
- Create a page for addresses that do not exist: Custom 404 Pages
- Review the detailed rules for file and folder names: File Naming Rules