Netlify option to show directory contents
Asked Answered
J

2

9

I need to list contents of my site directory on Netlify for debug, but I can not find an option to turn on directory listings. Am I right that there is no such autoindex ability in Netlify as mod_autoindex provides for Apache?

UPDATE: I tried generating index with tree -H '.' -L 1 > index.html, but `tree at Netlify is not installed. Maybe there is an alternative in Python, Ruby or npm repositories?

Jap answered 22/6, 2018 at 4:59 Comment(0)
H
22

There is an option to download your deployed site for debugging, but there is not a way to list the contents of a deployed directory at this time.

Steps:

  • Login to https://app.netlify.com
  • Select the site you want to see
  • Click on Deploys from the top menu
  • Select the deploy you want to download
  • Click on the download icon next to the deployed date shown below:

enter image description here

Hyacinthhyacintha answered 22/6, 2018 at 13:55 Comment(2)
This answer is also the answer Netlify's helpdesk would give you for dbeugging. If you instead really wanted to create a file listing that you or someone else could see in a browser, you'd have to do it programatically. Something like a build command of do_your_build && ls -l your_publish_directory would show the contents in the build log in your browser in netlify's UI. To show to someone else you'd have to make and publish a file containing the list: do_your_build && cd your_publish_directory && ls -lR > file_listing.txtConvolve
I had thought about adding the second solution of just listing out the directory, but having a file contents output is so complete I was not sure if I should mention that in the solution. Dumping the listing to a static file is a nice quick and dirty way to get a listing. Also, piece of mind what was actually pushed to the CDN for content is best as a first option. :)Hyacinthhyacintha
G
0

Netlify added support for viewing files in a deployment in October 2023. You access this through the site dashboard, just like the download option mentioned in the other answer.

Netlify deploy file browser

Griddlecake answered 11/3, 2024 at 22:48 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.