Build & Deploy
Now, we have our portfolio ready. Now we can exit out of our development server (Ctrl + C in Windows and Cmd + C in mac) and build the production build.
Building
ulka has a command called build to build the production ready site. Let's build ours then.
npm run build # OR npx ulka build
This is will create a new folder in your root directory. This name of folder will be same as buildPath we specified in ulka-config.js.
You can find the all the command in ulka here
Deploying
Now we have a production build we should deploy our portfolio to a internet.
Netlify
Deploying site generated by ulka to netlify is no different then deploying other sites. You can follow this article.
Github pages
Deploying to github pages may require some configuration.
my-username.github.io
If you are deploying your site with this typeof path then no configuration is needed. It's same as deploying the other sites. Use
gh-pagesto deploy your build folder.
my-username.github.io/my-portoflio
If you deploying your to a path like this then you need to do a little configuration. The steps are described below.
Open
ulka-config.jsand add a new key calledprefixUrland set the value to the path.For eg: If you are deploying to
coderosh.github.io/my-portfolio, then prefixUrl should be/my-portfolio/Change the navigation urls. Edit your all navigation urls by prefixing href with
info.prefix.For eg:
<a href="/blog">Blog</a>Change above code to
<a herf="{% info.prefix %}blog">Home</a>If link inside href is auto generated by ulka then you don't need to change it.
That's it now you can use
gh-pagesand deploy build folder.