Do I need to use "--cleanDestinationDir" when building a Hugo site on Netlify? - hosting

I use hugo --minify --cleanDestinationDir when developing my site locally so I can be sure that everything I can browse to is as a result of the very last build.
Without --cleanDestinationDir content can remain available from a previous build.
Is it something I need to use when building a site on Netlify?

Related

Using Angular libraries in Nativescript code sharing project

I'm trying to migrate an Angular app to a shared codebase with Nativescript using the new #nativescript/schematics, however, I'm having problems importing my Angular library when building the mobile version of the app. I used the angular-cli to create the library (ng generate library).
For the web version, all I had to do was build the library separately using ng build library-name which then allowed me to import it into the main application.
How can I build a mobile version of the library that can be imported into the main application when running tns run ios --bundle? I've already migrated the components and module of the library with appropriate *.tns files.
Any help is appreciated
I had the same problem. Nativescript cli do not have this feature where we can build an angular library into npm package and use it in other projects.
I tried a workaround and it worked for me. Write a script to copy all of your project files into another directory and replace all *.tns.ts, *tns.html and *.tns.scss. files with *.ts, *.html and *.scss respectively. Then build these files using regular ng command. You can add a build configuration for the same in angular.json file to build from the copied directory. I hope it helps.
I'm sorry this is just a hyperlink answer but the space required to answer this, in my opinion, is way too large. I just finished finalizing a repo I've been working on to do exactly this. I have a whole slew of angular web libraries that I now want to make available for use on mobile using NativeScript. I have put everything I have learned so far into this repo and I hope it helps you too.
Thanks for the final push/idea #Rohit, a script for doing what he suggests is in the test-lib/gulpfile.js of this repo.

Jekyll not Generating Folders

I am trying to use Jekyll to build my portfolio site which is hosted through Github Pages. However, after going through the setup process and watching some tutorials this is what I have in my project folder:
As you'll notice, it seems to be missing some important folder such as _layouts, but it also seems to be working fine. What am I missing here?
The tutorials or docs you saw may be missing gem themes, Jekyll 3.2.0 introduced gem based themes: By default you won't have these typical directories:
/assets
/_layouts
/_includes
/_sass
But you can always overwrite them or copy to your jekyll instance to modify them.

Ruby/Sinatra: Load additional code without restarting web app

I want to build a plugin system for a web app I'm writing. I don't want to have to restart the application every time a plugin is added/removed/enabled/disabled. Also I won't know the names of the plugins or even how many there are (I want to make it 'infintely' expandable).
The obvious way would be to reload the app on every request (as in this question, the Sinatra FAQ, and with Sinatra-Contrib). Reloading on every request would have poor performance for a production environment, especially a popular app.
I have read an article about Kernel#load and that it reloads the file when called multiple times and Kernel#autoload which only loads the code if needed. But both methods require the name of the module/class to be hard-coded in.
Jenkins CI and WordPress imply they can do this. Jenkins says "1000+ community contributed Jenkins plugins" and WordPress says "48,492 plugins". So I imagine it must be possible, but maybe only in Java or PHP.
I am working with Ruby 2.2, Rack 1.6.5, and Sinatra 1.4.7. I'm developing on Windows and I plan to deploy to Linux. If what I want is impossible to do on Windows (annoyingly some things are :P) I will set up a dev server with Linux.
Thanks!
EDIT: I will also need to be able to unload plugins. I'm not aware of any unload/un-require methods

Laravel Download and Installation

I'm a webdeveloper and I'm starting a huge project requested by a company.
I'm trying to figure out if is best to use a PHP framework or not, and in case, which one.
I know Codeigniter, but I wanted to look around to see what's the best framework at the moment. I found out Laravel is trending at the top so I wanted to try it out.
Being used to Codeigniter I usually download the zip file with all the phps inside and start working. I'm trying to do the same with Laravel but I saw you are to download and use composer to install it.
I'm not really used to the Terminal and I wanted to ask if that's the only way of installing it or if there is a downloadable version as in Codeigniter, CakePHP, etc...
You can always download the ZIPped code directly from project's GitHub site. You can find the base application here: https://github.com/laravel/laravel - you'll find a link at the bottom of the right column. This code is what composer downloads when you use that to setup the application.
If you want to use Laravel you will have to use Composer as this is what the application uses to manage its dependencies. It's not hard, as you'll only need to run a few commands.
You can learn more about how to install and use composer in the docs: https://getcomposer.org/download/

Best way to create a blog with static pages in Ruby

I just visited the Static Website Generation on Ruby toolbox and I don't know which of applications listed there is best suited for a little blog engine. Basically I need:
an index page with 1..5 of latest articles with shortened content;
possibility to add few main pages and a menu to access them (breadcrumb optional);
show articles
show/search archives
commenting system - Disqus Ok
tag-list cloud - optional
Look&Feel via layout
Important all content will be translated in 3 languages!
I can host on my own server, so side processing is possible.
Update:
First I'll try nanoc => blog's source on github
I think nanoc worth a try it has everything you specified, even if is not the best ranked on ruby toolbox its actively developed and highly customizable.
nanoc is a tool that runs on your local computer and compiles documents written in formats such as Markdown, Textile, Haml… into a static web site consisting of simple HTML files, ready for uploading to any web server.
and thats true :) I use it for a while not specially for a blog, but it has also helpers for that...
check out jekyll, it should work well for this.
Try my own "serious" - apart from archive search and tag cloud, it has everything you specified, plus the basic install should take you something like 5 minutes on heroku (and maybe 10 on your own server via Rack). It also has syntax highlighting, Disqus comments, Google Analytics and other goodies.
http://github.com/colszowka/serious
gem install serious
Disclaimer: It does not produce static html pages you can upload to your php vhost, though. But it uses caching and is really easy to setup and works on the free plan on heroku.

Resources