Code Monkey home page Code Monkey logo

webgen's People

Contributors

gettalong avatar svenhertle avatar xfbs 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

webgen's Issues

Tikz image generation

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:

  • Why are you calling pdflatex with the -shell-escape flag? That would be a potential security issue.
  • Would it make sense to add support for xelatex/lualatex? They natively support system fonts with fontspec.
  • Would it make sense to use \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?
  • Would it make sense to support generating *.svg images using pdf2svg from the Tikz drawings?

sass gem is deprecated

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.

generates menu entries that are not in the source directory

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?

all languages in menu

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:

webgen_menu

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.

[ERROR] invalid byte sequence in US-ASCII

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

webgen 1.0.0.beta3 -- Uninitialized constant

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...

private method `load' called for Psych:Module

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.

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.