简体   繁体   English

HUGO:内容链接在已部署站点中无法正常工作

[英]HUGO: Content Links not working properly in deployed site

I am a beginner in Hugo.我是雨果的初学者。 I generated a static site, added a theme, added some content.我生成了一个 static 站点,添加了主题,添加了一些内容。 It works in my local.它在我的本地工作。 All the links behave as they are supposed to.所有链接都按预期运行。 Then I do "Hugo" to generate deployable files in public directoery.然后我执行“Hugo”以在公共目录中生成可部署文件。 Now I placed this public folder in my server.现在我把这个公用文件夹放在我的服务器上。 The home page loads properly, but contents are redirecting to.net domain site.主页正确加载,但内容重定向到 .net 域站点。

(copy site url and check in you your browser) => https://smehetre.xyz/ Config file below: (复制站点 url 并检查您的浏览器)=> https://smehetre.xyz/下面的配置文件:

baseURL: https://smehtre.xyz/
languageCode: en-us
title: hello friend

theme: "PaperMod"

menu:
    main:
        - identifier: Search
          name: Search
          url: /search/
          weight: 10
        - identifier: Archives
          name: Archives
          url: /archives/
          weight: 20
        - identifier: Resume
          name: Resume
          url: /resume/
          weight: 30
        - identifier: About
          name: About
          url: /about/
          weight: 40

Public folder deployed on my nginx server:在我的 nginx 服务器上部署的公用文件夹:

├── 404.html
├── about
│   └── index.html
├── archives
│   └── index.html
├── assets
│   ├── css
│   │   └── stylesheet.min.8e489ec970cd58539487a8f697c827fd0de4aa9f638217b7db51cbc230ff6f95.css
│   └── js
│       ├── highlight.min.2840b7fccd34145847db71a290569594bdbdb00047097f75d6495d162f5d7dff.js
│       └── search.min.994d971a9492abf73721874ff533ba36f8b86300a65b0f03c96111ab1f6f32b2.js
├── categories
│   ├── index.html
│   └── index.xml
├── index.html
├── index.json
├── index.xml
├── page
│   └── 1
│       └── index.html
├── posts
│   ├── index.html
│   ├── index.xml
│   ├── my-first-post
│   │   └── index.html
│   └── page
│       └── 1
│           └── index.html
├── search
│   └── index.html
├── sitemap.xml
└── tags
    ├── index.html
    └── index.xml

Try to click on my first post, or Search or Archives or About page.尝试点击我的第一篇文章,或搜索或存档或关于页面。 It redirects to https:/.net.domain.name/它重定向到https:/.net.domain.name/

Please HELP!!!请帮忙!!!

This looks like a DNS issue, not a Hugo issue.这看起来像是 DNS 问题,而不是Hugo问题。

According to the WhatsMyDNS Tool your Name Server isn't set at all anywhere ( link ).根据WhatsMyDNS 工具,您的名称服务器根本没有在任何地方设置(链接)。

According to ICANN, you've never actually registered your domain.根据 ICANN 的说法,您实际上从未注册过您的域。 Godaddy shows the same . Godaddy 显示相同

You need to actually purchase a domain before you can use it.您需要实际购买域名才能使用它。

If you have purchased your domain, contact your registrar to figure out the issue.如果您已购买域名,请联系您的注册商以解决问题。

If you haven't purchased it yet, make sure you do that.如果您还没有购买它,请务必购买。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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