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

Prefix of filepath not appended in row item #1

Open
xor-gate opened this issue Dec 6, 2015 · 1 comment
Open

Prefix of filepath not appended in row item #1

xor-gate opened this issue Dec 6, 2015 · 1 comment

Comments

@xor-gate
Copy link

xor-gate commented Dec 6, 2015

Hi,

I'm trying your indexer and it works great, there is only a quirck when:

  • Index html location: http://{host}/i
  • JSON autoindex + files location: http://{host}/p

The folders are correctly loaded and navigate fine only the url href is not correctly written:

  • Current: /dir1/{file}
  • Should be prefixed with /p/: `/p/dir1/{file}

I hardcoded the prefix now myself when row.type != "directory" here:
https://github.com/kstep/nginx-autoindex-js/blob/master/index.html#L58

{{:: row.type == 'directory' ? '#' : '/p/' }}

I think the prefix could be loaded from the config.json file even when full host is set.

@xor-gate xor-gate changed the title Incorrect behaviour on different paths Prefix of filepath not appended in row item Dec 6, 2015
@SlIdE42
Copy link

SlIdE42 commented Feb 15, 2016

... or in a better way :

https://github.com/kstep/nginx-autoindex-js/blob/master/index.html#L58
{{:: row.type == 'directory' ? '#' : index.config.base_index_url }}

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

No branches or pull requests

2 participants