Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Set cutom_title to basename #243

Closed
systems-rebooter opened this issue Oct 28, 2015 · 7 comments
Closed

Set cutom_title to basename #243

systems-rebooter opened this issue Oct 28, 2015 · 7 comments

Comments

@systems-rebooter
Copy link

Hey,

When specifying a page title, overriding the default Index of (URL) can it possible to set it to

basename keyword

I mean the following

Index of example.com/A/B/C --> C keyword
Index of example.com/1/2/3 --> 3 keyword

Thanks!

@idleberg
Copy link
Owner

That's a good idea, will put it on my todo list!

@systems-rebooter
Copy link
Author

Cool. Thanks @idleberg

@systems-rebooter
Copy link
Author

Quick question, is there a way to trim Index of and leave only URL or even better, full_path dirs in cutom_title for now?

@systems-rebooter
Copy link
Author

Just noticed one small bug - if folder contains non-ascii chars, google mess it up converting to HTML %-likes in title.

screen shot 2015-11-03 at 12 26 35

<title>Index of example.com/browse/%E6%9E%AF/%E6%9E%AF%E5%B1%B1%E6%B0%B4%E3%82%B5%E3%83%A9%E3%82%A6%E3%83%B3%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0/</title>

So this enhancement will be really cool!

@idleberg
Copy link
Owner

idleberg commented Nov 3, 2015

Thanks! The bug should've be fixed in 5e0d750.

@idleberg
Copy link
Owner

idleberg commented Nov 3, 2015

I probably misunderstood your request for displaying the basename in <title> at first. On second thought I agree that this should be the default. Added in 4721551.

Let me know how this works for you and close the issue if applicable.

@systems-rebooter
Copy link
Author

Hey @idleberg

Thanks for the hot fixes. Yeah, its working as expected. Replacing

 $index = "Index of $folder";

with

$index = "$folder keyword";

in listr-functions.php is setting title exactly how I needed.

Closing the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants