CodeIT icon indicating copy to clipboard operation
CodeIT copied to clipboard

[BUG] The variable `{{< style "img { height: 1.25rem; }` on line 4 in `en/about/index.md` was not properly closed with `}}`. For more information,

Open KKKPJSKEY opened this issue 4 years ago • 3 comments

Describe the bug

When I commited Code to Github,Github respond this bug The variable {{< style "img { height: 1.25rem; } on line 4 in en/about/index.md was not properly closed with }}. And email get the same thisn For more information, I dont know whether it is a new rules which the Github Check the .md file. Due to this question I go a bad way to forbid all *.md by gitignore file . And some other theme have the config to close github's render function. What should i do about this.Thank you

Expected behavior

I think this will respond success.

Screenshots

image

Build Environment

(newest recent about April 5th 2021)

  • OS: [e.g. Windows 10]
  • Theme version/commit [e.g. 0.2.0]
  • Hugo version [e.g. 0.82.0-extended]

KKKPJSKEY avatar Apr 05 '21 15:04 KKKPJSKEY

Hi @KKKPJSKEY

You should not store Hugo source code on Github pages repository. You need to have 2 separate repositories.

On the first, you will have the source code of your blog. And, with Github Actions, you can set up the CI/CD to build and deploy your theme to your second repository.

The second repository should have only static files (HTML, CSS, JS).

victor-pogor avatar Apr 05 '21 19:04 victor-pogor

Hi @KKKPJSKEY

You should not store Hugo source code on Github pages repository. You need to have 2 separate repositories.

On the first, you will have the source code of your blog. And, with Github Actions, you can set up the CI/CD to build and deploy your theme to your second repository.

The second repository should have only static files (HTML, CSS, JS).

Hi @victor-pogor , The repository which have this question is just the second repository which is just you said. It only have the connand "Hugo" execute,and i upload the "public" package which just contain static file to the github .Although i dont have the first, i just commit them manually. And this theme have a function which is goto source markdown file,so that i want to upload my *.md file. Your way cant solved my question,thank you reply!

KKKPJSKEY avatar Apr 06 '21 03:04 KKKPJSKEY

Hello, @KKKPJSKEY hope my template site helps.

The setup is a single repo with two branches (main and gh-pages) and lets Github Hugo action build Markdown files in the main branch into HTML pages and GitHub pages action pushes HTML files to the gh-pages branch and make Github source the HTML files in gh-pages branch in the repo options.

Edit: If the two-repo setup is desired (e.g. to hide the Markdown sources), you might want to look at Deploy to external repository.

sosiristseng avatar Apr 06 '21 07:04 sosiristseng