leapcode / amber Goto Github PK
View Code? Open in Web Editor NEWFlexible static website generator, with good support for localization and navigation.
License: Other
Flexible static website generator, with good support for localization and navigation.
License: Other
When doing amber rebuild (amber 0.3.12) on my Debian bullseye system (ruby2.7) I am getting the following error:
ERROR: undefined method 'new' for BigDecimal:Class
I think that method was deprecated
https://github.com/ruby/ruby/blob/v2_6_0/NEWS#label-Stdlib+updates+-28outstanding+ones+only-29
https://github.com/ruby/bigdecimal#which-version-should-you-select
It is being used in lib/amber/page_array.rb
. The error seems to be triggered by this haml
= child_summaries :include_toc => true, :order_by => [:name, {:direction => :desc, :numeric => true}]
and rather than the summaries the output is "true". This can currently be seen here.
Hi,
I'm running amber-0.3.2 in debian testing. I installed it via the suggested way, that is 'gem install amber'.
When running 'amber server' inside my "riseup_help" directory I get this error:
amber server
/var/lib/gems/2.1.0/gems/i18n-0.7.0.beta1/lib/i18n.rb:284:in `enforce_available_locales!': :en is not a valid locale (I18n::InvalidLocale)
from /var/lib/gems/2.1.0/gems/i18n-0.7.0.beta1/lib/i18n/config.rb:34:in `default_locale='
from /var/lib/gems/2.1.0/gems/i18n-0.7.0.beta1/lib/i18n.rb:35:in `default_locale='
from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site_configuration.rb:96:in `cleanup'
from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site_configuration.rb:79:in `initialize'
from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site_configuration.rb:46:in `new'
from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site_configuration.rb:46:in `load'
from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site.rb:17:in `initialize'
from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/cli.rb:66:in `new'
from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/cli.rb:66:in `server'
from /var/lib/gems/2.1.0/gems/amber-0.3.2/bin/amber:79:in `main'
from /var/lib/gems/2.1.0/gems/amber-0.3.2/bin/amber:82:in `<top (required)>'
from /usr/local/bin/amber:23:in `load'
from /usr/local/bin/amber:23:in `<main>'
Hmm, this might seem familiar to you, but 8 months ago I wrote this.
This program checks if the translations files are up to date with the English ones. It then builds a database and a textile file with this data. People can then see what pages are not up to date and can work on that.
I know it's python and there are a few things that I should work on (using docopt if not nice if you are not running debian jessie), but I think it would be really nice to add this feature to amber. Without it, some pages can be reaaalllly outdated and nobody will know.
If you are still interested to implement this, please let me know. I can work on it a bit more and do mofications to make it easier to "port" to ruby if you want.
Like suggested in this issue on the leap_se repository, it would be nice to have rss | atom feeds. I really like how easy it is to manage internationalization with amber, but syndication feeds are, in my opinion, more than nice-to-have features. :)
I opened a new issue because I think it's more a generator feature than a single site feature. If I have some time I'll try to implement it myself, but I'm not really experimented in ruby and I don't have a lot of time, so if someone has some free time (lol) and can implement it, it would be nice. :P
Hi there, I've found something that looks like a bug that's manifesting on the riseup help pages:
When visiting a page with any translation (e.g. visualising the french, or german page), the link to the "about us" page in the page footer points to the english version of the page. The link in the menu up top is OK and points to the translated page.
for example, from: https://help.riseup.net/fr
in the footer, the link points to: https://help.riseup.net/about-us
whereas the link in the menu in the page header points to: https://help.riseup.net/fr/about-us
so it seems as though links in the footer don't point to translated page.
I would be really great if this could be packaged for Debian. IMHO, gems are yet another thing not to forget to update (gem, pip, git, etc.) and having a central update vector through apt is great.
Not sure which version of the various gems Amber needs I should test with, but this is my setup:
Ruby version: 2.1.2
Amber version: 0.3.11
HAML version: 4.0.7
When I run amber rebuild
on a fresh git clone and amber install, I get this error:
/Users/huertanix/Source/riseup_help/amber/layouts/_riseup_bar.html.haml:4:in `block in singleton class': undefined method `link_to' for #<Amber::Render::View:0x007f9a57303038> (NoMethodError)
from /Users/huertanix/Source/riseup_help/amber/layouts/_riseup_bar.html.haml:-10:in `instance_eval'
from /Users/huertanix/Source/riseup_help/amber/layouts/_riseup_bar.html.haml:-10:in `singleton class'
from /Users/huertanix/Source/riseup_help/amber/layouts/_riseup_bar.html.haml:-12:in `__tilt_70150418480120'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/haml.rb:19:in `evaluate'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/template.rb:128:in `render_haml'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/template.rb:73:in `render_html'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/template.rb:55:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/view.rb:70:in `render'
from /Users/huertanix/Source/riseup_help/amber/layouts/home.html.haml:15:in `block in singleton class'
from /Users/huertanix/Source/riseup_help/amber/layouts/home.html.haml:-9:in `instance_eval'
from /Users/huertanix/Source/riseup_help/amber/layouts/home.html.haml:-9:in `singleton class'
from /Users/huertanix/Source/riseup_help/amber/layouts/home.html.haml:-11:in `__tilt_70150418480120'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/haml.rb:19:in `evaluate'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/layout.rb:46:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/view.rb:66:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:131:in `block (2 levels) in render_content_files'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:129:in `open'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:129:in `block in render_content_files'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:121:in `each'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:121:in `render_content_files'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:35:in `render_to_file'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/site.rb:47:in `block in render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/site.rb:46:in `each'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/site.rb:46:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/cli.rb:48:in `block in rebuild'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/site.rb:72:in `with_destination'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/cli.rb:47:in `rebuild'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/bin/amber:81:in `main'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/bin/amber:84:in `<top (required)>'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/bin/amber:22:in `load'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/bin/amber:22:in `<main>'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Add support for running amber server
on windows. I think no need to support amber rebuild
on windows, because windows doesn't have symlinks and so it is fundamentally not really compatible with how amber works. But the server would be nice for letting people edit pages on windows.
For example vpn-red (or any other page) shows links for all languages even if there is no translation. This might be frustrating for users. Maybe missing languages could be greyed out?
While trying to run amber with bundle exec amber
to keep gem files in a specific directory, I found that:
bundle exec amber
to work outside of the amber
directoryCould not find amber/config.rb in the directory tree. Run amber from inside an amber website directory
)I think this could be solved if you could run something like amber server --path
instead of needing to run amber in the website files working dir.
I ended up symlinking a bunch of stuff to make this work, which is not ideal.
When amber rebuild'ing a site my console is flooded with 15k lines of this:
/var/lib/gems/2.7.0/gems/tilt-2.0.10/lib/tilt/haml.rb:77: warning: Haml::Engine#precompiled_method_return_value at /usr/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method Haml::Compiler#precompiled_method_return_value
I think this tilt commit (which is in tilt 2.0.10 which is what I am using) is supposed to fix that? But that commit didn't remove the code, it now just checks for Haml >= 5.0.0.beta.2 and if not it's got an else statement with the old way. So maybe the parser is still giving the warning each time it's used?
Super annoying and it drowns out legit output. Can those warnings be surpressed? Or maybe we lobby tilt upstream to drop support for old versions or make it not complain somehow.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.