Giter Site home page Giter Site logo

Comments (10)

petzi53 avatar petzi53 commented on July 17, 2024 1

I would like to support the idea of a visible version number in the theme.toml (or on another adequate place – I am not an expert on this).

My plea for this enhancement is the following:

  • Not every user is familiar with Git
  • Many users apply other methods (for instance R/RStudio/blogdown and update the theme with a ZIP file
  • Sometimes there are very busy theme developer (like @gcushen) which provides new updates with new features every few months
  • We ("normal") users are not constantly working on our websites and so it could be the case that we missed new versions or have lost track which version we have installed lately.

I think it is an advantage that there are a variety of methods to use a Hugo website. This brings new people into this exciting technical area. @bep maybe you could (re)think your argumentation under the aspect of these diverse methods to use your wonderful work with Hugo?

from hugothemessite.

radd2004 avatar radd2004 commented on July 17, 2024

I second this! As someone who develop themes for a number of frameworks and system, I usually rely on the version metadata for asset cache busting purposes.

Just coming to hugo and can't figure how to best version CSS and javascript assets without a version-esque metadata.

from hugothemessite.

gcushen avatar gcushen commented on July 17, 2024

@bep @digitalcraftsman please can you kindly provide feedback on supporting theme version metadata in theme.toml for the purpose of properly enabling users to update themes (especially users who install themes with ZIP rather than Git) and enabling theme developers to implement version-specific logic as @radd2004 suggested? See my above comment for full details.

from hugothemessite.

bep avatar bep commented on July 17, 2024

I don't think we should do this. I don't see big value (I see some value) and it will add one more item to maintain -- which will probably be correct starting out, but then quickly forgotten. Wrong data is worse than no data. Versions should live in the version control system (Git).

from hugothemessite.

gcushen avatar gcushen commented on July 17, 2024

Versions should live in the version control system (Git).

@bep so you are implying that all Hugo users must be experienced with Git if they wish to update a theme?

Academic (the most popular Hugo theme) has a significant number of users who are unfamiliar with Git and who report issues updating the theme as they are unsure which theme version they are currently on and thus which update instructions to follow. This is a specific and very popular case for adding theme version to the official theme metadata file, theme.toml. It's similar to the fact that the Hugo binary itself needs to know which version it is in order to update.

If you really think we shouldn't add theme version metadata to the official theme metadata file, then it would appear you are suggesting for us to create an unofficial theme metadata file to store the theme version for non-Git users?

from hugothemessite.

gcushen avatar gcushen commented on July 17, 2024

@bep bump

Theme version is inherently one of the most important parameters of a theme, thus should be recorded in the theme metadata file with a Hugo function to access it within the theme. Furthermore, ideally, Hugo functionality would be implemented to check for and apply theme updates. Pretty much every piece of popular software has these kind of core update features...

It might not be "cool" like the other features you are working on, but it would make Hugo more accessible and intuitive to use, particularly those users who are unfamiliar with Git.

from hugothemessite.

bep avatar bep commented on July 17, 2024

We recently got "theme inheritance and theme components". This opens up a whole set of new stuff that can be done with themes. And I have sketched some ideas about a simple package manager so you could just add the themes and components you want with the version you want and Hugo will take care of the dependencies.

But with that, we need to think hard about versions. It has to be designed, thought through; we cannot just add some random version number to a file and expect it to work. It has to work.

from hugothemessite.

petzi53 avatar petzi53 commented on July 17, 2024

Thanks for considering this enhancement. And clear enough: You are the expert and have to decide when and how this change could be made.

from hugothemessite.

 avatar commented on July 17, 2024

If a user needs to know which version of a theme they're using it should clearly be listed in the documentation, changelog and, ideally, a repo badge. Adding it to the config creates a secondary file to version-align alongside the N already-built package managers in existence today.

from hugothemessite.

stale avatar stale commented on July 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. Feel free to ask questions. We're glad to help.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

from hugothemessite.

Related Issues (20)

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.