I've seen Dart code that places all CSS, HTML, JS, images, etc. in an asset subdirectory, and other projects that place those same files under a web directory. Even the Dart package layout spec is ambiguous on the subject.
So I ask: when to put client-side resources under asset, and when to put them under web?
This is a new feature/convention.
The problem is, that the web server integrated into Darteditor doesn't yet support the asset directory. It's only supported by pub serve yet. But I guess Darteditor will support it soon and then this is the way to go.
Related
I am currently looking into static site generators.
I build a testing documentation site with Vuepress and am now fiddling with going into the live operation.
i don't want to publish my files to services (GitHub Pages, Netlify etc.) but I want to host it on my own server.
Generating static html sites everytime I add markdown pages or change the content is not an option.
Is there a way to host Vuepress (or maybe similar markdown generators) where I just need to upload the .md files and everything goes automatically?
There are two basic ways to use markdown as your website...
use a live server:
In this scenario, each request is processed by a program which retrieves the markdown text and does some pre or post processing (templateengine, formatting etc).
This could be a simple CGI script, a web framework or a custom server.
use a static site generator:
You process the markdown on your lokal machine and generate static html files, which are uploaded and served by a web server.
To answer your question whether or how you can use vuepress:
There are multiple possible ways, depending on your current setup.
If you only have some webspace, than you have to upload prerendered html files (or using another framework).
If you have a virtual server, than you can automate the build/rending process by using scripts, e. g. with file watchers.
Note to GitHub:
Even if you said, that you don't want to use GH... If you only want to hide the markdown files, you can create a private repository and use GH Actions as CI/CD pipeline.
Unfortunately Stackoverflow is not for software recommendation, so for alternatives to vuepress have a lookt at Software Recommendations.
I want start using the framework foundation for sites but after reading the DOCS (http://foundation.zurb.com/sites/docs/installation.html) I got confused:
Why I should use a package manager to download a bunch of html, css and javascript file?
Or is there something else in the pile?
I'm working on windows and I know what are more or less html, css and javascript, but I'm new to frontend framework.
Thanks for your attention.
Download foundation first here complete-f6.zip. Then use foundation.min.css and foundation.min.js (of course include jquery.js) on your page and you're free to use whatever is in the foundation docs.
Since you're new, I would recommend using Yeti Launch. Yeti Launch allows you to create a Foundation 6 project with a Basic or Advanced template. The templates use a package manager with everything wired up for you.
With Yeti Launch you get the benefits of a build system (browser reloading, page templates, minification/concatenation, include only the components you use, autoprefixes, etc.) and you don't have to use the command line if you're not comfortable with it.
I have used several solutions like Berkelium project, CEfSharp, awesomium.net, The Web application i built constitutes of Javascipts, xml, CSS. When I used these solutions for files published on server they properly work out but when i give path like (file:///path) it stops responding.
Depending on your needs as alternatives to file:// maybe look at either:
Implementing a SchemeHandler as showcased by both the CefSharp.WinForms.Example and WPF ditto.
Maybe even an OWIN married with CEF implementation, like Harley
or see this other answer: Ajax not working in CefSharp based WebView with local files
I am new to liferay portal.. Does it supports multimedia file formats by default.. or any plugins needs to be added..?
You can upload any content to the document library - this can be files of any type. There are also plugins available to (for example) embed flash or videos on the page - these might as well come from external locations, but don't need to.
The portal itself is agnostic: It just generates the HTML, therefor everything that you can generate in HTML (and referenced files: images, css, video, audio etc) is supported. There's no specialized "streaming server", delivering large multimedia files in chunks or partially, but you can still embed them by referencing an external streaming server (if this is what you need - media streaming is not the core business of a portal)
For referencing such content from the CMS it usually pays to take a look into structures and templates. These help you to separate the links to media from the generated HTML.
We have a medium sized .js file that we include in our web framework that I am porting over to SharePoint. However, I'm not sure how to go about this or what the best practice is. This is for a framework solution that will be used by other client projects, so it's best for it to be self contained and deploy-able, rather than requiring manually deploying files to the webserver.
My current thinking to put the JavaScript into an embedded resource and then use the script manager to write out the file. Does this seem reasonable? Or does anyone have any other recommendations?
Embeded resource is the best way and you don't need to use the ScriptManager to render it out (as AJAX is not configured OoB on SharePoint), you can just render it as any other client script resource (through the ClientScriptManager).
Best idea is the have an if ContainsScriptManager else UsClientScriptManager style.
That way you get the best of both worlds
You could just toss it into a doc library.
If you are packaging your web part into a sharepoint solution, you could include it as a Module (VSEWSS item). Your manifest file would get something like:
<TemplateFiles>
<TemplateFile Location="LAYOUTS\somescript.js" />
</TemplateFiles>
Theres lots of info on how to do this on the web. I've liked the doc library option for images, css, and javascript because I don't have to rebuild and wait for for SP to JIT compile for 30 seconds each time I do a minor tweak to some style or script. I just edit these things in SPDesigner right out of the doc library.
Create resource mapped folder in your project and put the js file there and give the referene of the js file as _layout/jsfilename.js and this js file will be deployed with your project where ever you will deploy it.