local links fixed before apply the template
add flags in the cmd for port and for docs directory