nginx-autoindex-js icon indicating copy to clipboard operation
nginx-autoindex-js copied to clipboard

Prefix of filepath not appended in row item

Open xor-gate opened this issue 9 years ago • 1 comments

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 avatar Dec 06 '15 16:12 xor-gate

... 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 }}

SlIdE42 avatar Feb 15 '16 15:02 SlIdE42