See for example demo here:
https://on8ztwzvhh5hoqtfwumxhq-on.drv.tw/Drv2Web/ which is in fact folder "Drv2Web" and subfolders on my google-drive.
See Post #3 for a more advanced webpage by using Markdown converted to HTML.
Assuming you have a directory tree to share already on disk
First create index.html recursively, here are two options:
(there are more of course that can be found on the web).
- Perl script:
https://gist.github.com/Zverik/3555260
https://on8ztwzvhh5hoqtfwumxhq-on.drv.t ... e_index.pl
depends on perl module "HTML::Template", install with PPM: libhtml-template-perl
Make the script executable first.
Run the script from the top of your shared folder:
Code: Select all
./recursive_index.pl -r
- Python script:
https://gist.github.com/glowinthedark/b ... a49fd09f49
https://on8ztwzvhh5hoqtfwumxhq-on.drv.t ... y_index.py
Make the script executable first.
Run the script from the top of your shared folder:
Code: Select all
./generate_directory_index.py
Ok, now that the html files are created, upload the whole directory tree to your google-drive
Or if it's already on google-drive, just upload the new index.html files in the different directories to google-drive (matching the same directories)
The top directory needs to be marked as "shared" otherwise it won't work.
To demonstrate I use test folder Drv2Web that I have setup on my google drive including the index.html files (created by the python script).
https://on8ztwzvhh5hoqtfwumxhq-on.drv.tw/Drv2Web/
Now, go to https://drv.tw/ (DriveToWeb) NO registration required, and choose Google-drive:
Choose account (if not logged in already, you need to login first):
Give DriveToWeb permission (sorry, it's in Dutch, "Toestaan" means "Allow"):
Wait a while and your link(s) should show:
If all works well ... congratulations !! You now have your website hosted from google-drive FOR FREE !
Instead of an index website, it's also possible to host another form of static website. of course, using HTML.
Fred