简体   繁体   中英

Jekyll and liquid templating with custom domain

I have my Jekyll site on Github pages which is being forwarded to my domain with Digital Ocean. I got my domain working but realized that using this code {{ link.title }}

that my nav is being redirected back to my Github pages site.
I tried to add my domain name to my config file but then everything breaks. Can I still use liquid templating? Is there a better way?

url: "http://jmstan.github.io"
baseurl: "/portfolio4"

Call assets like this :

<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
or
<img src="{{ site.baseurl }}/assets/logoexample3.png">

Links are like this :

<a href="{{site.baseurl}}{{post.url}}">{{post.title}}</a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM