Hugo deployment on Vercel ignores markup.tableOfContents settings - vercel

Summary
When I deploy to Vercel with Hugo as a Present framework, the following setting are being ignored. It works locally, though.
[markup]
[markup.tableOfContents]
startLevel = 2
endLevel = 2
The Vercel deployment also creates sub navigation of H3.
Any ideas why this would be happening?
Locally, I am running hugo v0.98.0+extended linux/amd64 BuildDate=unknown.

Related

SpaTemplate angular - Publish to Azure - Error: Cannot find module 'aspnet-webpack'

I use the asp.net core angular spatemplate. The project is running without problems on my local machine. However, when I publish it to azure I run into an internal server error.
After setting the aspnetcore_environment to development in the azure portal, I can see a the error:
Exception: Call to Node module failed with error: Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'
I found some hints here https://github.com/sgbj/generator-aspnetcore-angular2/issues/23
Basically it says the node_modules folder is missing in the production environment. And it describes a way to add it manually to the project.json file. But the spatemplate didn't create such a file... it contains a classic *.proj
I am very new to web development and I don't know how to add the missing dependency to the proj file. And I am not sure if this is really the issue, because the sample I am following on the web https://channel9.msdn.com/events/Visual-Studio/Visual-Studio-2017-Launch/WEB-103 is not setting anything in this direction.
If I create a plain new project with
dotnet new angular
and I publish it everything works fine without any issues?! So I have the feeling I destroyed something in the solution?! Any idea?
My question is how can I set the node_modules for publishing?
In Startup.cs you probably have the below in Configure() method:
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions {
HotModuleReplacement = true
});
}
This enables hot module replacement with webpack. When you make a change and save a file, webpack automatically re compiles the angular app so your browser picks up the changes without you reloading the page. You don't want this functionality when publishing.
"env.IsDevelopment()" will check for an environment variable on your PC = ASPNETCORE_ENVIRONMENT=Development
In the app service, add an app setting like below:
Alternatively you could comment the hot module replacement out.
Finally I found a solution for this problem. I removed the Publish Profile in my VS2017 solution and to delete the related app service on Azure. After creating everything new again the publishing works well again. I hope this will never ever happen in production.

Angular CLI production build doesn't load on Apache

I build my production build with ng build --env=prod. When I try to serve it with Apache 2 all I see is Loading.... No error messages in the console, nothing.
The weird thing is that:
1) The development build works just fine
2) Also the production build works fine with the dev server and also with e.g. a Python ad-hoc server.
What could possibly cause this?
I only set in my environment.prod.ts:
export const environment = {
production: true
};

How to create an aurelia 1.0 app that can be deployed at any root location

I am trying to work out how to deploy an aurelia app, it runs in development with au run. but I need to deploy it into a path which is not the root of the web-site. ie at '/site' not '/'
when I deploy I get an exception from the router: ERROR [app-router] Error: Route not found: /site/
I think it may be that I need to specify a baseURL in one or more places?
but can't see how I can:
make it work in the development environment at /
make it work in the deployed environment at /[any-site-path]
avoid building in knowledge of '/[any-site-path]' to my development environment or bundles, as the path wont be known until someone comes to deploy the code?
i found this question but that seems to apply to an out of date version of the code.
I am using Aurelia 1.0 and building using the au-cli
Any pointers would be useful.
Looks like this is a bug that has been fixed in a more recent version.
I have just gone through and applied the latest versions of:
"aurelia-bootstrapper": "^1.0.0" -> "^2.1.1"
"aurelia-cli": "^0.24.0" -> "^0.26.1"
"aurelia-tools": "^0.2.2" -> "^1.0.0"
And i can now deploy my application to a site sub folder without specifying any url content in the code or html files!
So I can satisfy all 3 of the criteria in my question.
Note the aurelia-cli update (0.25.0) requires a change to the main.(ts/js) as mentioned in the release notes.

Permission denied for a css when deploying to heroku

I have a sample app that is using compass gem including blueprint. I just deployed this app on heroku for the first time and I'm seeing the following error in heroku logs
Errno::EACCES (Permission denied - /app/public/stylesheets/ie.css):
Is there something special required in my rails app that will make this error go away? I'm assuming it's coming because I'm using the compass gem...
Do a compass compile before deploying to heroku.
Also, in your production.rb, add the following line:
Sass::Plugin.options[:never_update] = true
This will prevent compass from compiling css at runtime (since heroku does not allow writes on filesystem)
Just set this option to true in config/environments/production.rb and everything will work fine:
config.assets.compile = true
Save ie.css from your local machine, add it into your public/stylesheets folder, and push it up to heroku.

Running rails 3 in production mode

I am having issues running my rails 3 project in production mode.
I am getting tons of routing errors, and they are all in the public folder, images, stylesheets and javascript. No other resources seem to have this problem.
Everything works fine in development and test.
In production.rb file change the following from false to true
config.serve_static_assets = true