Giter Club home page Giter Club logo

hugo-prose's Introduction

HUGO PROSE

It is not the man who has too little that is poor, but the one who hankers after more

Hugo Prose is a theme derived from the hugo-xmin theme, and inspired by Wowchemy (previously known as the Academic theme), Distill, and tufte.css. See https://prose.yihui.org for a live demo.

Please note that this project is still work-in-progress.

Screenshot

hugo-prose's People

Contributors

apreshill avatar gaospecial avatar jienagu avatar pzhaonet avatar yihui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hugo-prose's Issues

Control overflow and positioning of card titles

Hi @yihui,

I cannot offer a fix, but with any custom font I choose, the title of the cards overflows from the card itself:
Screen Shot 2020-11-19 at 8 04 54 PM
Screen Shot 2020-11-19 at 8 05 08 PM

It would also be nice to offer a knob to turn within each card's yaml with like position so you can pick title on the side or on top. I am thinking of the data visualization advice to not force readers to tilt their heads 🤣

Is a photo on your website necessary?

It doesn't need to be a professional headshot, but I think including a photo of yourself is very important so that other people can recognise you when they see you in person.

Chroma vs. highlight.js for syntax highlighting

By default, Hugo uses Chroma for server-side rendering.

Using Chroma brings us some benefits aligning with this theme's purpose:

  • Superior client-side performance
  • Elimination of an external JS dependency

with some potential drawbacks:

  • Fewer color styles (however one could customize the CSS)
  • Fewer supported languages
  • May break the habits of bookdown (Not quite sure about this because I only skimmed bookdown's docs)

Though I am aware of the parameter disable_highlight, which can turn off highlight.js, I would like to hear your opinion(s) about this.

Links don't get underlined in `_index.md`

Hey,

Just started tinkering with hugo-prose today. I appreciate the minimalism of this theme and the fact that it's a WIP but I actually really like that, so that I can learn and make it my own.

Setting up my _index.md I noticed that the URLs don't get highlighted, which does happen in posts, see below:

image

I was wondering if this is by design/choice and how to change it/fix it, rather than manually underlining the links

1280宽度,光标悬浮于脚注编号,脚注还是会移动过去

Screenshot_20240326_113221

用户已经看到脚注了,没必要移动脚注,而且脚注长达超出屏幕了。

把这段css的宽度改为 1281px 可以避免这个问题。

@media (min-width: 1280px) {
  .note-ref:hover + .side {
    display: inline-block;
    background-color: #f8f8f8;
    position: absolute;
    margin-left: 1em;
    padding: .5em;
    box-sizing: content-box;
  }
}

Jumpy sticky TOC on Firefox

I believe this is a known issue with Firefox and the position: sticky CSS selector, but the experience of scrolling through a post with the sticky TOC is pretty jumpy.

Kapture 2020-11-13 at 10 45 10

add global sticky navbar option

If I set the sticky menu globally, it only affects pages, it still doesn't affect the home page, or any other pages like sitemap or the single card pages in the demo site:

params:
  pageFeatures: [+sticky_menu]

To get the sticky menu to work for those pages, I had to set it individually in the _index.md front matter. I think this is a bit confusing- can you add a global sticky menu option?

Consider a project archetype/layout

A lot of folks who use other themes like to be able to display projects as a portfolio (in the example site, I changed "work" to "project"). Definitely one of the best features of Academic/Wowchemy. I think you have the infrastructure to do this, but want to pin these:

luizdepra/hugo-coder#59

https://djnavarro.github.io/hugo-calade/project/

https://academic-demo.netlify.app/#projects

https://desiree.rbind.io/project_landing/

https://maya.rbind.io/shiny/

Nice to have features:

  1. adding a featured image to a card. Academic used the trick of having it always named featured.jpg for example then used regex to locate that image (if you do it this way, it becomes easier to use the featured image for social sharing of that individual project page).

  2. ability to add custom metadata as buttons per project (i.e., beyond categories and tags). I use this pretty heavily so I can better save all the relevant links for each project like: https://alison.rbind.io/project/advanced-r-markdown/ and https://share-blogdown.netlify.app/post/07-site/

[QUESTION] - How to disable TOC for a single article or globally?

I haven't seen anywhere whether it is possible to disable TOC for a single article, is it?

Globally disabling the TOC I have only seen this:

### Table of contents
TOC should be automatically generated unless it is disabled via
`features: [-toc]` in YAML. To define the TOC title, use the `toc-title` field
in YAML.

But I haven't gotten it to work either

表格过宽溢出屏幕外怎么办

益辉大神好,我最近用hugo-prose主题时,如果knitr出来的表格过宽的话,会出现表格溢出的情况,影响美观,请问这个是在哪里设置,谢谢

Generation of repository name twice in URL

Hello,
I'm trying to start my blog using hugo-prose with github page.
So I made "blog" repository in my github, and edit "config.yaml" as follows.

Here is a problem.
If I click other tabs (Home, About, Sitemap) , they don't work and show "404 page not found" message.
Here are their local addresses.

Could you help me with this problem?

Mobile home page is squashed to left.

Screenshot from 2020-12-01 07-28-23

A resolution of 300*800 appears like this.

On my mobile screen, it appears to have extra whitespace that can scroll to the right.

If anyone knows what's the issue that would be great, otherwise I'll dig a bit deeper into the CSS when I get some time.

Visual editor mode snafus

Trying to include a single image:

::: {.embed-right}
![mycology illustration](featured.jpg)
:::

<div class="embed-right">
![mycology illustration](featured.jpg)
</div>

{{< figure src="featured.jpg" alt="mushrooms" caption="Illustration by Beatrix Potter" >}}

If I flip on visual editor mode, <div class="embed-right"> becomes this: ::: {.embed-right} and renders with the dots:

Screen Shot 2020-11-20 at 10 14 04 AM

The figure shortcode works well but doesn't show a preview in the visual editor. It would be great to be able to write blog posts well with the visual editor.

Does hugo-prose support multiple level header menu?

I create a folder about and placed two markdown files: file1.md and file2.md in it. So is it possible to add a menu about with two subitem file1 and file2?

Where should I check to understand the underlying mechanism of menu integration in this theme?

Example site content fodder

Remove dark theme customisation?

I was surprised by the default display of the site:

Screenshot 2020-11-09 at 3 42 56 PM

Screenshot 2020-11-09 at 3 43 42 PM

But I think this is because you have:

/* dark theme */
@media (prefers-color-scheme: dark) {
  body {
    background-color: darkslategray;
    filter: invert(1);
  }
  img { filter: invert(1); }
  .article-list { box-shadow: 0 0 8px #333; }
}

I think the site is much more aesthetically pleasing if you don't invert all the colours.

Bug: hovering footnote <sup> also pulls all footnote after it within same <p>

Bug in action: (This is a general Markdown test document on vanilla Hugo server. I also tweaked the style a little bit to make the hovering more obvious. Not tested for Rmd or Blogdown.)

image

I was able to find the exact CSS code that has caused this bug:

image

After changing from ~ to + in the selector, the hovering effect is now only pulling the intended footnote:

image

However, this CSS file seems to have been imported by some JS within this theme, and I am not very well-versed with JS. So, I am writing this issue to see if you would like to address it somehow. If there is another repo where you know the bug is coming from, please tell me and I can create an issue there as well.

Thank you very much for this beautiful theme as always.

Consider grouping home page listing content by section + highlight listing pages better

Currently, you can set the number of cards in the config file, and the kind of content shows up in the side title. But, it isn't totally clear to a user that if you click on "post" for example, that you'll see all posts. This makes it hard for a user to use the home page to highlight while at the same time letting their readers know "hey there is more over here".

One solution is to group the content by section (perhaps using your side title but in the margin on the left?) then allowing either 1 (make card fill up single row), 2 (as you have it), or 4 (as you have it) elements per section? Then you could have a pointer after each content section group that says "see all __" like "see all posts", and "see all projects", etc.

How my personal site is set up:
Screen Shot 2020-11-20 at 10 27 03 AM

Consider visually denoting drafts

Make a contact form, or remove from footer

Currently it leads to a 404 page. Many organizations (BlkInData, MiR, ROpenSci ) like to have a form, and with Netlify forms there doesn't have to be a third party.

When I first started blogging, even though folks could email me, I got the nicest messages through my website contact form- it probably felt like a lower activation level for some folks to just say "thanks" and send kind words.

[QUESTION] Adding "description" to list.html

Hey @yihui, first of all, thanks so much for this theme, I am having a lot of fun and learning a lot making it my own

I am trying to add a description of sorts under "Posts" (as an example):
image

I see that the Posts or Work pages (from the example page) get rendered from the list.html template but I have not been able to figure out how parameters like .IsHome or .Title get passed down to the renderer. In essence, I would like to have a Posts page and a Work page with a short paragraph within them. When I create an _index.md in the posts/ folder for example a "card" gets created instead of the plain HTML default output. See below:

default page:
image

When I add _index.md:

image

I'd like to keep the look of the default Posts page

Allow disabling of author names on listing pages

For team sites it is a great feature to see content authors listed on the listing pages, but for individual sites it can feel self-congratulatory to list your name over and over again. With distill, we enabled this in the _site.yml file- author names are printed by default but you can disable this with:

---
collections:
  posts:
    authors_metadata: false
---

It would be great to be able to do this on a site- and per-post level, and I think relatively easy to do with Hugo.

Enable site-wide search

Distill recently added this via fuse.js based on feature requests, and the new RStudio blog (a blogdown site built with a custom Hugo theme) will have it too via lunr.js.

This is very hard to add on your own, and is now a big differentiator for users to make the choice between Distill/bookdown and blogdown (one of the reasons I use the academic theme for teaching).

See:

https://github.com/rstudio/rstudio.com/pull/156/commits/026af8566fc1d3c3b6eee6d1a686f8551bec3b73

https://palant.info/2020/06/04/the-easier-way-to-use-lunr-search-with-hugo/

Feature enhancement: timeline

Hi Yihui,

It would be nice to bring the timeline to this theme so users can demo their working experience or any timeline info. I built one using pure css (no dependency) in the codepen: https://codepen.io/Jienagu/pen/NWreNvJ

Welcome to use it because I don't know how to implement into RMarkdown yet. Also feel free to let me know any thoughts or feedbacks. :)

Consider an alternative of vertical side title?

Hi Yihui and team,

I love this theme so far! I have one suggestion about the "dangerous" vertical side title design.

  1. It forces users to have a certain length of content for each block. If the content is too short, the title will be cut off (see screenshot), if too long, it is not perfectly central aligned.
  2. If the vertical subtitle is too long but the content is short, we might also need to consider the text wrapping which might cause some padding issues.
  3. Aesthetically speaking, vertical title or subtitle mixed with content is not an efficient design.

But I would like to hear from you that any specific idea behind this design?

Thank you!

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.