gettalong / webgen Goto Github PK
View Code? Open in Web Editor NEWwebgen is a fast, powerful and extensible static website generator
Home Page: http://webgen.gettalong.org
License: Other
webgen is a fast, powerful and extensible static website generator
Home Page: http://webgen.gettalong.org
License: Other
I'm currently using webgen for a personal project and I've really come to like it. I do feel that I could do a bit to improve the tikz support tho. So here's some questions/ideas:
pdflatex
with the -shell-escape
flag? That would be a potential security issue.fontspec
.\documentclass[tikz]{standalone}
, in datawebgen/passive_sources/templates/tikz.template
, because like the you don't need pdfcrop
and you get a lot of useful packages pre-loaded?*.svg
images using pdf2svg
from the Tikz drawings?The sass gem is deprecated since March 2019, a replacement is sassc based on libsass.
In content_processor/sass.rb
you provide custom importers. The api in sassc seems to have changed (there is a Sassc::Importer
rather than a Sass::Importers
), so I don't know how easy this would be to adapt.
webgen currently depends on kramdown ~> 1.3, which according to https://kramdown.gettalong.org/news.html is vulnerable to CVE-2020-14001. Could the kramdown dependency be updated?
Downstream security bug in Gentoo: https://bugs.gentoo.org/733116
Well there are 3 markdown parsers, but sadly none of them is CommonMark compliant. It would be good to have one like https://github.com/gjtorikian/commonmarker
I'm on Debian Wheezy and installed
gem install webgen --version=1.2.1
Then generated a blank website
webgen generate website test
I added an empty file 00.index.en.page and empty default.template into the src directory. I added to default_template:
--- pipeline:tags
{menu: }
Then I generated the website. It ouputs errors:
ERROR Could not resolve '/images/index.html' in language 'en' in </index.en.html>
ERROR Could not resolve '/images/index.html' in language 'en' in </index.en.html>
ERROR Could not resolve '/images/index.html' in language 'en' in </index.en.html>
ERROR Could not resolve '/stylesheets/index.html' in language 'en' in </index.en.html>
ERROR Could not resolve '/stylesheets/index.html' in language 'en' in </index.en.html>
ERROR Could not resolve '/stylesheets/index.html' in language 'en' in </index.en.html>
ERROR Could not resolve '/templates/index.html' in language 'en' in </index.en.html>
ERROR Could not resolve '/templates/index.html' in language 'en' in </index.en.html>
ERROR Could not resolve '/templates/index.html' in language 'en' in </index.en.html>
The out/index.html shows a menu like this:
/
Images
Generated by webgen
Webgen logo
Stylesheets
Api
Coderay default
Templates
Api
Feed
Sitemap
Tag
Tikz
Default
Index
It should ouput nothing at this point, and there should be no error messages. Any hints what I'm doing wrong?
When I try to build a website with webgen, all languages of a specific page (same acn) appear in the menu. I would like that only one entry appears, namely the link to the current language.
To create a minimal working example, I first installed webgen and webgen-templates-bundle through gem. After that I entered the following commands as a normal user:
$ webgen version
webgen 1.2.1
$ webgen create website testsite
$ cd testsite/
$ echo website.lang: nl >> webgen.config
$ ln -s /var/lib/gems/1.9.1/gems/webgen-templates-bundle-1.0.0/lib/webgen/bundle/templates/data/simple/src/default.css src/
$ ln -s /var/lib/gems/1.9.1/gems/webgen-templates-bundle-1.0.0/lib/webgen/bundle/templates/data/simple/src/default.template src/
src/index.page:
---
lang: nl
title: Mijn paginatitel
description: Een leuke beschrijving
---
Dit is voorbeeldinhoud.
src/index.en.page:
---
lang: en
title: My Page Title
description: Some fancy description
---
This is some sample content.
src/andere.page:
---
lang: nl
in_menu: true
title: Andere pagina
description: Een andere beschrijving
---
Dit is andere voorbeeldinhoud.
src/andere.en.page:
---
lang: en
in_menu: true
title: Other page
description: Another description
---
This is some other content.
$ webgen generate
INFO Generating website...
INFO [update] </>
INFO ... done in 0.10 seconds
The resulting page is:
The bug (or feature request, or user error) is that there is both "Other page" and "Andere pagina", while I am looking at the Dutch version of the page, hence only "Andere pagina" should appear.
I am developing a benchmark of the page generation time of the different SSGs, webgen is not conducting as expected. It returns an invalid byte sequence error in US-ASCII when I run the webgen generate command. I am creating the pages within SSG as follows:
src/posts/2019-09-20-10.page
---
created_at: 2019-09-20
title: 2019-09-20-10
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum euismod luctus massa. Pellentesque porta augue non varius semper. In vitae pulvinar dolor. Nunc erat sem, facilisis eu augue in, aliquam viverra magna. Quisque porttitor sodales diam, a vestibulum sem semper vel. Integer tempus quam eu ex egestas, sed auctor neque venenatis. Fusce mattis metus pellentesque iaculis euismod. Vestibulum a dictum lectus, a porta odio. Etiam sit amet lobortis lorem. Mauris iaculis ornare risus, at dictum nullam.
I hope to get some support to add webgen to the tests along with 13 other SSGs
Hello Thomas!
After installing the newest beta version of webgen via the following command:
gem install webgen -v 1.0.0.beta1 --pre
i was unable to run the demo-project: webgen quit with the following message:
webgen encountered a problem:
uninitialized constant Webgen::WebsiteAccess
I was unable to spot a class named WebsiteAccess within my installation folder of webgen...
There is a strange bug when using webgen with psych 2.0.13, when calling webgen
I get an error:
webgen encountered a problem:
private method `load' called for Psych:Module
If I uninstall psych 2.0.13 to use psych 2.0.8 (or simply add "gem 'psych', '2.0.8'" to webgen/cli.rb), webgen can start correctly. Of course 'load' is a valid method for YAML, so what happen is that according to $LOADED_FEATURES, when using psych 2.0.13 only the following librairies are loaded related to psych:
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych/exception.rb",
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych/syntax_error.rb",
"/home/dams/opt/pkgmgr/gems/extensions/x86_64-linux/2.2.0/psych-2.0.13/psych.so",
"/usr/lib/ruby/2.2.0/yaml.rb",
By contrast the others gems which don't have a problem with psych-2.13 like pry give
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych/exception.rb",
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych/syntax_error.rb",
"/home/dams/opt/pkgmgr/gems/extensions/x86_64-linux/2.2.0/psych-2.0.13/psych.so",
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych/omap.rb",
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych/set.rb",
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych/class_loader.rb",
"/usr/lib/ruby/2.2.0/x86_64-linux/strscan.so",
[...]
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych/handlers/document_stream.rb",
"/home/dams/opt/pkgmgr/gems/gems/psych-2.0.13/lib/psych.rb",
"/usr/lib/ruby/2.2.0/yaml.rb",
So psych 2.13 is not fully loaded by webgen, but since it is called via "require 'yaml'" I don't see what's different from other gems. I have the same problem with psych 2.12, 2.11 and 2.10 (and I think psych 2.9), across different computers.
asd
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.