Git Product home page Git Product logo

loppo's People

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

loppo's Issues

RTL support?

Hi @ruanyf
Is loppo support right to left document?
If not, how can i add it?
Thanks

删除chapters.yml

运行loppo的时候,是不是可以自动删除chapters.yml文件,
否则不会重新生成 目录文件。

$ loppo 报错

$ loppo-demo loppo
/usr/local/lib/node_modules/loppo/bin/cmd.js:57
if (!argv._.includes('server') && !argv._.includes('count')) {
            ^

TypeError: argv._.includes is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/loppo/bin/cmd.js:57:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:974:3

node: v4.6.0
npm: v4.1.1

运行loppo报错:/usr/local/lib/node_modules/loppo/node_modules/markdown-it/lib/renderer.js:108 return options.breaks ? (options.xhtmlOut ? '<br />\n' : '<br>\n') : '\n'; ^

具体错误:

➜ myloppo loppo
✔ INFO [19:29:32] - [BEGIN] build docs
✔ INFO [19:29:32] - [BEGIN] handle config file
ℹ INFO [19:29:32] - [INFO] create the config file
✔ INFO [19:29:32] - [END] handle config file
✔ INFO [19:29:32] - [BEGIN] handle chapters file
ℹ INFO [19:29:32] - [INFO] create the chapters file
✔ INFO [19:29:32] - [END] handle chapters file
✔ INFO [19:29:32] - [BEGIN] handle theme files
✔ INFO [19:29:32] - [END] handle theme files
✔ INFO [19:29:32] - [BEGIN] copy assets to output directory
✔ INFO [19:29:32] - [END] copy assets to output directory
✔ INFO [19:29:32] - [BEGIN] publish pages to output directory
✔ INFO [19:29:32] - [BEGIN] create / page
✔ INFO [19:29:32] - [END] create / page
✔ INFO [19:29:32] - [BEGIN] create a.md page
/usr/local/lib/node_modules/loppo/node_modules/markdown-it/lib/renderer.js:108
return options.breaks ? (options.xhtmlOut ? '
\n' : '
\n') : '\n';
^

TypeError: Cannot read property 'breaks' of undefined
at Object.default_rules.softbreak (/usr/local/lib/node_modules/loppo/node_modules/markdown-it/lib/renderer.js:108:17)
at Renderer.renderInline (/usr/local/lib/node_modules/loppo/node_modules/markdown-it/lib/renderer.js:271:28)
at Renderer.render (/usr/local/lib/node_modules/loppo/node_modules/markdown-it/lib/renderer.js:324:22)
at Array. (/usr/local/lib/node_modules/loppo/node_modules/markdown-it-toc-and-anchor/dist/index.js:85:49)
at Core.process (/usr/local/lib/node_modules/loppo/node_modules/markdown-it/lib/parser_core.js:51:13)
at MarkdownIt.parse (/usr/local/lib/node_modules/loppo/node_modules/markdown-it/lib/index.js:519:13)
at MarkdownIt.render (/usr/local/lib/node_modules/loppo/node_modules/markdown-it/lib/index.js:539:36)
at markdownRender (/usr/local/lib/node_modules/loppo/lib/utils.js:552:26)
at makePage (/usr/local/lib/node_modules/loppo/lib/utils.js:640:15)
at /usr/local/lib/node_modules/loppo/lib/page.js:13:5

如何添加图片文件?

当我在 docs 或 dist 目录添加图片文件后,只要在服务器执行 loppo,则图片文件都会被删除,这个问题怎么解决呢?

谢谢

when directory is too deep,UI is not right.I Think it‘s bug

Dear ryf,Thank you for your nice work.When I learn and use your loppo component,I find that when put directory too deep,UI is not right.For Example,directories like this:
chapters.yml:

  • test/: test
  • test/etst.md: etst.md
  • devlelop/: devlelop
  • devlelop/front/: front
  • devlelop/front/1.md: 1.md
  • devlelop/front/2.md: 2.md
  • devlelop/back/: back
  • devlelop/back/3/: 3
  • devlelop/back/3/3.md: 3
  • devlelop/back/4/4.md: 4
  • other/: other
  • other/etst.md: etst.md
    you will find it is wrong.
    I modified the lib/utils.js:
  1. i<(current_level-level); -------------------->isFirstLevelDir?i<=(current_level-level):i<(current_level-level));
  2. level>current_level|| (level===current_level&&chapterPathOrigin.split('/')[level]==='')
    ----------------------> level>current_level|| (level===current_level&&chapterPathOrigin.split('/')[level]==='')||isFirstLevelDir

and then it worked~
Thanks your nice work again.

运行loppo报错

/usr/local/lib/node_modules/loppo/node_modules/tarim/index.js:17
);
^
SyntaxError: Unexpected token )
at Object.exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/loppo/lib/theme.js:8:20)
at Module._compile (module.js:571:32)

为何只生成了page1.html , page2.html?

hi.

root@localhost:/usr/local/loppo-site/docs# ls
page1.md page2.md page3.md page4.md page5.md
root@localhost:/usr/local/loppo-site/docs#
root@localhost:/usr/local/loppo-site/docs# cd ../dist
root@localhost:/usr/local/loppo-site/dist# ls
assets favicon.ico index.html page1.html page2.html
root@localhost:/usr/local/loppo-site/dist#

我创建了page1.md page2.md page3.md page4.md page5.md,为何只生成了page1.html , page2.html?

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.