File Includes - (pulled in before export)

That is supposed to be a simple but powerful addition.

I would like to use some kind of CustomCode object which contents is linked to an external file on my hard drive, maybe located in a special directory next to the *.bsdesign file. (i.e. projectname.bsincludes/ )

Before the html code is published, that file should be pulled in.

If the include file could be also parsed for mark-down code with automatic P and H tags being created that would be even better.

I see a big benefit here since I can reduce the size of the bsdesign project, make it easier to change and to edit. It could also be great for templates and simple blogs.

( I personally can implement some kind of file parser to update my own variables in the html files, but this requires an extra step and will not work at preview time. I also thought of using php, but that has the same problem and I also have to rename my files. And SSI introduces a security risk.)

+++++1 On external file support, but then we’ve been asking for that for years lol so good luck!

For now though, if you are not already doing this (don’t shoot the messenger if you are already lol):
Upload the files you want to link to, to your server in the location you want them to be (preferably not within the Assets folder or any other folder that BSS creates so that you don’t accidentally delete them when updating your site.

Create links in your project to the Absolute URL of the files you want linked. This way they should show within the Browser preview, and are already set to go when you export and upload updates.

Ya it’s a hassle indeed. It would be so much nicer if BSS would just be able to utilize local folders so we can structure them how they are on the server and then be able to use Relative URLs. We’d still need to upload the files ourselves, but … that’s fine because like you, I don’t want to bloat my BSS project file with a multitude of extra files.

Hope that helps, and if not, good luck and I support most of what you are asking for. (I say most because I don’t understand the rest LOL)

Thanks for the tip. I wrote yesterday a little windows tool which helps me. It injects the text into markers written as HTML comment which I added in BSS as custom code:

<!--INSERT-->somefile.htm<!--INSERTEND-->

My project is not finalized, just for my personal use. I could make it a “product” I guess, if there is demand.

The result is on my new website:
https://www.fotoarray.com/news.html

For the news section I write some markup code which is converted to HTML before injection.

I find the CustomCode ingenious. It helps with all problems I had so far. I found out that at some point it s a good thing to convert a navmenu into HTML. In the following I can edit the menu directly in HTML. This avoids the problem with forgotten active states, being not able to edit invisible text (i.e. in a sidebar) and, most important, allows it to put in any links I need very quickly.

Regards,
Julian

1 Like