Codeberg/pages-server
26
387
Fork
You've already forked pages-server
54

[Feature Idea] .pages file to set specific things (i.e. ignore files) #232

Open
opened 2023年07月18日 17:22:54 +02:00 by Andre601 · 0 comments

I like Codeber pages a lot.
Tho I think there could be some extra features to further improve how it works, which I like to propose here.

These features would all exist in a .pages file that is put in the root directory of the pages branch.

source-directory

This option would set the directory - relative to root - from where it would serve the page content.

Example:

source-directory:docs

This would serve content from the docs directory.
Not sure, but this may be equal to _redirects' /* /docs/:splat 200 feature?

ignore-files

This option lets Codeberg pages ignore certain files and folders.
Glob patterns could be used.

Example:

ignore-files:- 'README.md'- '**/README.md'

Ignores the README.md file in the root directory and any README.md files in any sub-folder.

redirects

Would effectively replace the _redirects file in functionality.

Example:

redirects:- '/foo /bar'- '/articles/* /posts/:splat 302'

default-pages

Defines files to serve on specifit HTTP Status responses.

Example:

default-pages:- '404 /errors/404.html'

Serves the 404.html file from the errors folder whenever a 404 is returned.

Maybe also make Codeberg pages look for specific pages like 404.html or 404.md to serve by default?


I hope that these features can be considered and eventually implemented.

I like Codeber pages a lot. Tho I think there could be some extra features to further improve how it works, which I like to propose here. These features would all exist in a `.pages` file that is put in the root directory of the pages branch. ## `source-directory` This option would set the directory - relative to root - from where it would serve the page content. Example: ```yaml source-directory: docs ``` This would serve content from the docs directory. Not sure, but this may be equal to `_redirects`' `/* /docs/:splat 200` feature? ## `ignore-files` This option lets Codeberg pages ignore certain files and folders. Glob patterns could be used. Example: ```yaml ignore-files: - 'README.md' - '**/README.md' ``` Ignores the README.md file in the root directory and any README.md files in any sub-folder. ## `redirects` Would effectively replace the `_redirects` file in functionality. Example: ```yaml redirects: - '/foo /bar' - '/articles/* /posts/:splat 302' ``` ## `default-pages` Defines files to serve on specifit HTTP Status responses. Example: ```yaml default-pages: - '404 /errors/404.html' ``` Serves the 404.html file from the errors folder whenever a 404 is returned. Maybe also make Codeberg pages look for specific pages like 404.html or 404.md to serve by default? --- I hope that these features can be considered and eventually implemented.
Sign in to join this conversation.
No Branch/Tag specified
main
no-not-allow-for-new-users
pages
pages-custom-domain-update
ci_user-local-acme-service
feat/redis-caching
fix/memory-problem
v6.4
v6.3
v6.2.1
v6.2
v6.1
v6.0
v5.1
v5.0
v4.6.3
v4.6.2
v4.6.1
v4.6
v4.5
v4.4
v4.3
v4.2
v4.1
v4.0
v3.2.1
v3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v3.1
v3.0a
v3.0
v2.5b
v2.5a
v2.5
v2.4
v2.3
v2.2
v2.1
v2.0
v1.0_php
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/pages-server#232
Reference in a new issue
Codeberg/pages-server
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?