mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-19 14:57:21 +01:00
Add browsing support to the pdocs utility.
This commit is contained in:
parent
177e63e383
commit
2a414ea2ea
@ -1,11 +1,11 @@
|
||||
extends WebRoot
|
||||
extends BrowsableFolderServeWebPage
|
||||
|
||||
var markdown_renderer : MarkdownRenderer = null
|
||||
|
||||
func serve_md(request: WebServerRequest) -> void:
|
||||
var path : String = request.get_path_full()
|
||||
|
||||
var fabs : String = www_root_file_cache.wwwroot_get_file_abspath(path)
|
||||
var fabs : String = get_file_cache().wwwroot_get_file_abspath(path)
|
||||
|
||||
if fabs == "":
|
||||
request.send_error(HTTPServerEnums.HTTP_STATUS_CODE_404_NOT_FOUND)
|
@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource path="res://WebRoot.gd" type="Script" id=1]
|
||||
[ext_resource path="res://BrowsableFolderServeWebPage.gd" type="Script" id=1]
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
|
||||
@ -25,6 +25,7 @@ uri = "http://127.0.0.1:8080"
|
||||
[node name="WebServerSimple" type="WebServerSimple" parent="."]
|
||||
start_on_ready = true
|
||||
|
||||
[node name="WebRoot" type="WebRoot" parent="WebServerSimple"]
|
||||
www_root_path = "res://www/"
|
||||
[node name="BrowsableFolderServeWebPage" type="BrowsableFolderServeWebPage" parent="WebServerSimple"]
|
||||
uri_segment = "/"
|
||||
serve_folder = "res://www/"
|
||||
script = ExtResource( 1 )
|
||||
|
Loading…
Reference in New Issue
Block a user