Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: a manifest property to define directory indexes for the app:// protocol [$10] #2069

Open
Mithgol opened this issue Jul 13, 2014 · 2 comments
Labels

Comments

@Mithgol
Copy link
Contributor

Mithgol commented Jul 13, 2014

The app:// protocol (intoduced in v0.7.0) helps in repackaging web sites as node-webkit-based applications. “Absolute paths” starting from the “root directory” (i.e. /some/path; such paths are common in web-based applications) now start from the root directory of your node-webkit-based application (i.e. in the same directory where your package.json resides). For example, the following hyperlink would work:

<a href="/index.html">To the root index.html</a>

However, this won't work as expected:

<a href="/">To the root</a>

In node-webkit this would display a directory index of your application's root directory, such as the following:

(screenshot)

However, a web-based application would typically rely on a web server's configuration directive (such as Apache's DirectoryIndex) and expect an index file (such as index.html or index.htm) to be displayed instead.

For a further help in repackaging web sites as node-webkit-based applications, I have to request a new feature in a form of some additional property in the mainfest, such as the following:

"appDirectoryIndex": ["index.html", "index.htm"]

If a directory (instead of a file) is designated by an app:// URL, then node-webkit should search for directory index files (in order of appearance in the array given in the appDirectoryIndex property) and display the first of such files (if found any) instead of the “real” index (list of files) of that directory.

The problem is very real. Today it will become necessary for me (or some colleague) to replace all /pathnames/ with /pathnames/index.html in about ten HTML5 files on a small web site that is planned to become a node-webkit-based application. On a greater site there could be much more files and such replacement would require some scripting (involving a recursive walk though the directories and applying some cheerio to build a DOM and change only the hyperlinks).

Finally I have to admit that I also have some feeling of deja vu about this feature request, though I couldn't find any prevoius similar proposal in the issues.

There is a $10 open bounty on this issue. Add to the bounty at Bountysource.

@rogerwang rogerwang changed the title Feature request: a manifest property to define directory indexes for the app:// protocol Feature request: a manifest property to define directory indexes for the app:// protocol [$10] Aug 2, 2014
@nwjs-bot
Copy link

This should be working with latest version now.

In 0.13 we changed to an optimized architecture so more features can be supported, see http://nwjs.io/blog/whats-new-in-0.13/ and it's good for keeping up with Chromium upstream -- we released with Node.js v6.0 and new Chromium versions within 1 day after upstream release.

The new version would fixed many issues reported here and we're scrubbing them. This issue is closed as we believe it should be fixed. Please leave a message if it isn't and we'll reopen it.

@Mithgol
Copy link
Contributor Author

Mithgol commented Aug 31, 2016

I believe that this issue is not fixed. Thus I am reopening it.

However, since chrome-extension:// protocol is used in newer verions of NW.js instead of the former app://, I am no longer sure that directory index files can be supported by NW.js without becoming less compatible with Chrome extensions.

@Mithgol Mithgol reopened this Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants