Closed protik77 closed 8 years ago
Yeah, I have noticed the same issue. This theme is so nice that I ditched Pelican for Hugo. Thank you !!! It definitely meets the content that a person in academic wants to showcase. Not only the math parsing in the homepage, but also code blocks. They look fine in the real post, but not in the homepage. Trying to go into the source code to fix it.
That fixed the universal math rendering but not the code-block. One more question, is it possible to link to external images other than those in static/img? Thanks.
@fischcheng what do you mean exactly by code-block? Are you trying to write math inside HTML tags within a Markdown file?
Sure, you can use external images for most things. Just ensure you use the full URL of the image including HTTP/HTTPS prefix. If you have a problem, let me know exactly where you are trying to add an external image.
Hi, by code block I mean those block of codes. It's part of the markdown syntax, either 4 spaces or 3 back-ticks. It works for individual pages, but not works on the home page. You can check your own demo-site. For the "Writing content with Markdown, LaTeX, and Shortcodes" page, everything is rendered in-line, instead of code blocks shown as intended. Also, is there an option to set the number of lines to display for each section on the homepage?
Regarding the external images, the thing is I tried to migrate my old posts to a new site built with Hugo. The old pages were rendered using Pelican, I had some plugin to display image (liquid-style tag), and videos. I'm still poking around if there are a way to show video in the post beside vimeo and youtube. Also, I was trying to use the tag "image" in the project pages, I put an URL to that line, but it didn't show at the generated html. Thanks in advance!
@fischcheng I assume you are interested in controlling the number of publications and posts that are displayed on the home page. You can control these numbers by using the count
variable in config.toml
like follows:
[params.publications]
count = 10
...
[params.posts]
count = 5
...
Regarding videos and advanced content, if you wish to insert your own custom content and you are having trouble achieving it with existing Shortcodes or Markdown (discussed in the documentation), you can use HTML within the Markdown files.
To add external images to Markdown, you can use Markdown syntax:
![](https://gohugo.io/img/hugo-logo.png)
Thanks. I looked around and found some working shortcodes, successfully inserted some images and YouTube videos.
No, I noticed the settings in the .toml file, I mean the length of summary of each item. I haven changed those and explored a little bit in the theme/layouts. I did change the banner image to take the full URL for individual posts.
It seems the hugo/blackfriday doesn't render the pages within page. For the "posts" page, the same rendering persists as the "posts" section in the homepage. Within individual "posts" the rendering is correct.
Thanks for reply!
My issue is resolved. Thanks!
@fischcheng sounds like you are after Hugo's <!--more-->
summary divider: https://gohugo.io/content/summaries#user-defined-manual-summary-split
Thanks for the tip. Will definitely look into it.
Did you see the same issue for the theme? Specifically the "Writing content with Markdown, LaTeX, and Shortcodes" post. On the "posts" and "homepage", individual post will not be rendered correctly. The them works superbly, just this issue still bothers me.
@fischcheng I think I understand your question about rendering better now and have just made an update.
Follow the documentation at the bottom of http://gcushen.github.io/hugo-academic-demo/post/getting-started/ to update your site to the latest version of the theme. With the 1f77c05 update, post summaries have improved rendering, and you can also use <!--more-->
within your post to customize the length of the summary. See the new example of "Writing content with Markdown, LaTeX, and Shortcodes" in version 1f77c05.
I solved Latex math rendering in post summaries issue by changing the params.toml
file from math = false
to math = true
. Changing the comfig.toml math
argument only impacted the actual post content, not the summary.
Very nice job on the theme. Loved it at my first glance. Anyway I am having an issue.
I am using some in-line latex math in my posts. While clicked on post or visiting the page for the post the latex looks fine. But from homepage it looks like this:
How can I show it rendered in my homepage?