cms.js icon indicating copy to clipboard operation
cms.js copied to clipboard

Support for websites without Indexing support

Open mesarpe opened this issue 5 years ago • 6 comments

By changing the line 88 of filecollection.js, it is possible to support web servers without support for the Apache directive DirectoryIndex.

It is necessary to replace: get(this.getFileListUrl(this.type, config), function(success, error) { By the following: get(this.getFileListUrl(this.type, config) + '/index.html', function(success, error) {

Then, we can manually generate the index.html and support every web server. I have tried on release 2.0, and it works successfully.

Cheers and great work! PS: it's not an issue.... btw.

mesarpe avatar Mar 02 '19 15:03 mesarpe

Very interested but I cannot seem to find filecollection.js after cloning (used recommended git clone https://github.com/chrisdiana/cms.js-starter.git)

Even downloaded the latest release and not in files.

Any advice appreciated.

oleteacher avatar Mar 26 '19 19:03 oleteacher

Thanks for the suggestion @mesarpe! Great thinking! We should be able to roll that into the next release.

chrisdiana avatar Apr 04 '19 12:04 chrisdiana

@oleteacher it's most likely because the starter project only includes the minified version. you can see the file collection source here.

chrisdiana avatar Apr 04 '19 12:04 chrisdiana

I wonder if it could be possible to specify a sitemap from a single json or yml config file, for easy to configure completely static sites with no external API calls or indexing required? How hard would that be to adapt here? Thank you!

jywarren avatar May 23 '22 16:05 jywarren

Hmm, https://github.com/chrisdiana/cms.js/blob/main/src/filecollection.js seems pretty straightforward in terms of being adapted to a static JSON index... would you be open to my trying?

jywarren avatar May 23 '22 16:05 jywarren

Another way to streamline this could be to run an automated index.html generator such as https://www.npmjs.com/package/generate-index-html as well.

jywarren avatar Oct 27 '22 14:10 jywarren