Giter Club home page Giter Club logo

cuttlebelle's People

Contributors

dominikwilkowski avatar markseuffert avatar nathf avatar paigevogie avatar yanick 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  avatar  avatar  avatar

cuttlebelle's Issues

RSS/Atom Support

πŸ€” Is RSS/Atom support planned for in the future? I could see cuttlebelle being very useful for a simple blog 😍 .

Feature: Adding extra files into your output folder

I'm trying to deploy to firebase which requires a /404.html to be present.

The index folder is special. It represents the root of your website. It will compile to yourwebsite.com/. Note that the _shared folder does not have an index.yml file. That means this folder won’t be generating any web pages.

pages like /404/index.yml create site/404/index.html Is there a way to add site/404.html?

_pages variables not available on first build

I'm having a problem where components are being rendered but the _pages object is missing on the first render. If I save the component file manually after cuttlebelle is already watching it renders properly. All variables are missing (declared in .yml and the .md files).

I can put together an example but just wondering if you had any thoughts first...

docs needs to show `oneOf` items

So when I declare proptypes like: level: PropTypes.oneOf([ 1, 2, 3, 4, 5, 6 ]).isRequired, then the docs should show these options.

bad output windows

first i tried running staystatic small example for a blog. it failed. i reported back a month ago.
decided to build your "website" git repo - turns out it fails the same way.
it does not seem to be windows friendly with many error on you commands.

trying with linux:
on windows's ubuntu - it builds without noticeable errors. but the index page looks completely broken much like i remembered from the staystatic blog.

sadly, no errors to report. can you try it on a windows machine ? (node 8-10)
btw, yes I ran all the correct commands.

Image of stay static & cuttlebelle homepage build

Move default props into an object

To make it consistent how we call components we need to name our props, even the default ones.

So this:

const Header = ( props ) => ()

becomes this:

const Header = ({ _ID, _body, _parents }) => ()

Question about ReactJS

I started playing with Cuttlebelle. I am coming from a ReactJS perspective, I so felt at home. However, does Cuttlebelle only use JSX for layout? E.g. I created a very simple component to change internal state on click. It didn't work. It didn't even log console messages.

React Event Handler does not work

I am trying to do some action on click event. But something like this doesn't work. (By doesn't work, I mean page renders, but nothing happens on click)

<footer onClick={() => console.log('footer')}>
       { footer }
</footer>

Does cuttlebelle strip out the event handlers?

Write tests

Jest is already installed, just need to write the tests

Enhancement: Can not configure browser-sync options

I am trying to create a proxy of a local website using cuttlebelle -w but I cannot change the settings for browser-sync.

It would be nice to be able to pass an object to cuttlebelle -w with additional options for browser-sync πŸ’― . Happy to help out with this if needed.

cuttlebelle -w doesn't rebuild changes to code

When changing layouts/components under ./code/ cuttlebelle successfully detects the change and rebuilds the site, however changes in the React components are not reflected in the output.

Easy way to test this is to change the default page to have a minor change (prefix the <title> or something) after starting cuttlebelle -w - the change will not be reflected despite everything giving a green light.

Multi language content

Hi! Um searching for a new, modern generator for me needs, and i'm loving cuttlebell concept so far. Does it os able to deal with multilanguage content?

Generating multiple subpages with the same layout

So I've been reading through the docs and playing around with a sample site and this project looks really great!

Is it possible to create multiple paths with a single index.yaml file, though? I haven't been able to find a way yet.

Something like this

posts/index.yaml

posts:
  - post1.md
  - post2.md
  - post3.md
  - post4.md

Generating

/posts/post1/index.html
/posts/post2/index.html
/posts/post3/index.html
/posts/post4/index.html

This would be really useful to avoid a lot of boilerplate if each of those items have the same layout to avoid having a separate folder & yaml for each one; like blog posts

Bug: can not call builtin functions inside of react function.

If I add the following line to page.js it will not render.

const Page = ({
  title, stylesheet, header, main, footer, script, _relativeURL, _ID, _pages,
}) => {
  const a = Object.assign({}, _pages});
...
 πŸ””  INFO:    Generating pages
 πŸ”₯  ERROR:   The react component page had trouble rendering:
 πŸ”₯  ERROR:   Error: Cannot find module 'babel-runtime/core-js/object/assign'

Add browsersync to watch

Adding a server to watch will help development.
I would also like to add optional soothing sounds to the end of each watch task so we don't have to watch the watch.

File and Directory iterators

I need to create a page with several fragments coming from different files.

Example:

dir1/
    body1.md
    example1.json
    body2.md
    example2.json
    summary.md

All this would create 1 file index.html with a compound of those files (for example, a concatenation).

Is there a way to create a Layout or perhaps something to generate this?

HTML instead of markdown files

Maybe I'm not yet familiar how to do it properly, but let's say I want to apply Bootstrap's img-fluid class to an image, or put it in a col so that it is responsively placed next to the text or below. Right now I have to create custom React components to layout stuff on the page.
This seems to be an overkill.
It would be very handy if I could use HTML tags and css classes for my content.

Request: Include stack trace in render errors

It's really difficult debugging js layouts when cuttlebelle only outputs single-line errors without stack traces or line numbers. In render.js, errors caught in the babel and react stages are logged using Log.error( error ) and it only needs to be changed to Log.error(error.stack) to achieve this. Or, the stack could be printed only with --verbose.

JS API

Is there a JS API for the generator? It would be ulono for integration with a complex Assembly such as to cause the Assembly inside the Gulp.

Pagination

What's the recommended way to add pagination to blog posts or any other content type?

Thanks! Love the project.

Markdown files saved using CRLF are not properly parsed

When a markdown file is saved with Windows line endings (CRLF), and processed using Cuttlebelle on the Linux Subsystem for Windows, the parser apparently interprets the entire file as a single line.

For example, the front matter is interpreted as an H2, as shown in this example:

image

Change Markdown processor?

Marked is a bit old now, and is not well suited to plugin development.

I have implemented Markdown-It locally and have updated the tests etc. to match and I'm happy to provide as a PR. It allows for multiple plugins to be loaded, both custom and Markdown-It plugins from NPM. One thing I couldn't do was replace Marked-Man for the man page creation though.

There is also Remark, which is probably more widely used and seems to have more plugins authored. It wouldn't take much work to switch out my Markdown-It implementation for Remark as they are quite similar.

I feel like a really good plugin system for markdown will really help usability of Cuttlebelle, with less need to switch from one file to another in the index.yml for each page to achieve layout that could be more easily done with extended markdown.

I want this for myself, so will likely move to Remark, just wanted to do something with the most potential to share back to upstream if it is desirable.

In summary:

  1. Should Cuttlebelle switch to a newer Markdown processor?
  2. If so, should it be Markdown-It, or Remark, or something else?

License

Hi. I'm curious . Why did you choose GPL? Isn't MIT or another permissive license better in this case or is your choice intentional?

is there a cuttlebelle file limit?

With 100000 files with 500bytes i'm getting:

$ cuttlebelle
 πŸ™           Cuttlebelle v1.0.0-alpha.67
πŸ”₯  ERROR:   Reading file failed for /opt/cuttlebelle/src/content/posts/2019-09-23-065514/index.ym/lπŸ”₯  ERROR:   {"errno":-24,"code":"EMFILE","syscall":"open","path":"/opt/cuttlebelle/src/content/posts/2019-09-23-065514/index.yml"}
πŸ”₯  ERROR:   Trying to initilize the pages failed.
πŸ”₯  ERROR:   "{\"errno\":-24,\"code\":\"EMFILE\",\"syscall\":\"open\",\"path\":\"/opt/cuttlebelle/src/content/posts/2019-09-23-065514/index.yml\"}"    

https://github.com/ssgberk/ssg-frameworks/tree/fea944a1e08f0a7e1e8d7889cbec907e50a86d69/JavaScript/cuttlebelle

Markdown parsing of list broken in 1.0.0-alpha.59

Hello!

We were happy Cuttlebelle users from version v1.0.0-alpha.57 now. I would like to require if you have release notes.

When we started using v1.0.0-alpha.59, our site was wrongly generated. I think version v1.0.0-alpha.58 was OK (from our point of view) but version v1.0.0-alpha.59 had issues with sub lists and graphs.

Example:

# Example Contents

  1. [Setup](#Setup)
  1. [Basics](#Basics)
    1. [Testing connectivity and parameters](#Testing connectivity and parameters)
  1. [example_exception.json)](#example_exception.json))
    1. [Lookup the company's record.](#Lookup the company's record.)
  1. [Push Notifications API](#Push Notifications API)
  1. [Setup connection parameters.](#Setup connection parameters.)
    1. [Define a handler](#Define a handler)
    1. [More stuff More stuff More stuff More stuff More stuff More stuff More stuff More stuff More stuff More stuff More stuff More stuff More stuff ](#More stuff More stuff More stuff More stuff More stuff More stuff More stuff )
  1. [More stuff API](#More stuff  API)

You could try to render it with both versions of cuttlebelle to see the difference (and brokeness)

Bug: Docs command fails to run after global install

Steps to repro:

  1. Install cuttlebelle globally
  2. Init new project
  3. Run cuttlebelle docs inside the new project.

Should error out saying that you're missing these modules:

  • babel-preset-es2015
  • babel-preset-react
  • babel-preset-stage-0
  • prop-types
  • react

Case sensitive build

Currently the generator seems to allow case insensitive content files to build correctly.

E.g.
index.yml

main:
 - introduction.md

File is actually named Introduction.md

This is allowed, requesting the generation to fail with errors instead.

Rebuilding how props are applied

What currently happens

Given a content structure like this:

.
└── index
    β”œβ”€β”€ body1.md
    β”œβ”€β”€ body2.md
    β”œβ”€β”€ body3.md
    └── index.yml

Props applied in body1.md, body2.md and body3.md are all merged with the props of index.yml.

Example:
body1.md

---
title: Body 1 title
---

Some text

body2.md

---
title: Body 2 title
---

Some text

and index.yml

title: Homepage
main:
  - body1.md
  - body2.md
  - body3.md

The props for this page inside _pages for example will be determined by a race condition on whichever partial will finish rendering first.

_pages: {
  title: 'Body 2 title',
  main: [
    'body1.md',
    'body2.md',
    'body3.md',
  ],
}

What should happen

Props should be namespaced to their partials. Given the structure and content above the props for the index page inside _pages should be something like:

_pages: {
  title: 'Homepage',
  main: {
    'body1.md': { title: 'Body 1 title' },
    'body2.md': { title: 'Body 2 title' },
    'body3.md': { title: 'Body 3 title' },
  },
}

Note that the direct prop to the layout in this case main will remain pure html you can just use in your layout.

Building this out now which will be a breaking change.

Tree and Routes for a localized website

I produce mostly multi language websites. I would like to produce an output as:

-- mysite.com/
--- /index.html
--- /en
---- /information
---- /blog
---- /section
--- /it
---- /informazioni
---- /blog
---- /sezione
--- /pt
---- /informaçáes
---- /blog
---- /seção

I would like to organize the content as:

-- content
--- _shared/
--- index/
---- index.yml (root index,html)
---- index.en.yml (/en/index.html)
---- index.it.yml (/it/index.html)
---- index.pt.yml (/pt/index.html)
--- info/
---- index.en.yml
---- index.it.yml
---- index.pt.yml
--- section/
---- index.en.yml
---- index.it.yml
---- index.pt.yml

Is it possible?

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.