Comments (10)
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.
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.
@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.
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.
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.
@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.
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.
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.
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.
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)
- wrong theme count HOT 5
- Theme demo broken, probably because of incorrect BaseURL (minimo) HOT 1
- Output features with matching readme anchor links
- Theme names on homepage are capitalized wrong HOT 4
- Invalid header rule on the Themes website HOT 4
- Tags selection broken on mobile HOT 1
- History navigation keyboard shortcut triggers theme navigation HOT 1
- Change navbar link for Hugo Themes Showcase HOT 3
- Double slashes on demo site for each theme HOT 1
- Preview <img> is larger than image on higher resolutions HOT 3
- Losslessly optimize all images on site HOT 7
- Add stale bot in this repo HOT 1
- Question about Goldmark settings HOT 3
- Convert theme thumbs to use 'w' units instead of 'x' HOT 1
- Fix mobile menu on the ThemesSite
- Fix search input on the ThemeSite for iOS Safari HOT 1
- {{ .Permalink }} makes double slash url HOT 11
- The `.git` directory is extremely bloated HOT 1
- Cupper Theme in Hugo not working HOT 3
- Previous and next theme linked without their name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugothemessite.