Coder Social home page Coder Social logo

egoist / docute Goto Github PK

View Code? Open in Web Editor NEW
3.8K 53.0 424.0 3.1 MB

📚 Effortless documentation, done right.

Home Page: https://docute.egoist.dev

License: MIT License

JavaScript 57.16% CSS 5.38% Vue 37.46%
documentation gitbook docute pr-welcome documentation-tool vue

docute's Introduction

ATTENTION: this project is no longer actively maintained (I still push some code once in a while), if you want to see improvements on this project, please consider sponsoring me.

Docute

npm version jsdelivr downloads circleci donate

Effortless documentation, done right.

Features

  • No build process, website is generated on the fly.
  • A simple yet elegant UI that is dedicated to documentation.
  • Leveraging the power of Markdown and Vue.
  • Extensible plugin system, plenty of official and community plugins.

Documentation

Resources

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

Docute © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).

Website · GitHub @EGOIST · Twitter @localhost_5173

docute's People

Contributors

2nthony avatar danielruf avatar dependabot[bot] avatar egoist avatar hcysunyang avatar ittus avatar kevgathuku avatar markstonehouse avatar mcdoyaji avatar noraj avatar qc-l avatar saltysugar avatar semantic-release-bot avatar stdrc 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  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

docute's Issues

Server-side rendering

docute can be used alone as single page app but what if it supports SSR? If you care about SEO then SSR is a big win!

The further plan is to support generating static html files at some point.

Maybe it will be the first docs generator that supports:

  • single page app, build docs on the fly
  • server-side rendering, you don't need to build the docs but also have it seo-friendly
  • build to static files, just like traditional static website generator

Provide an optimized version

we can bundle all vendor code in a single file:

  • optimized/docute-vendor.js <- this will rarely change unless we add new dependencies
  • optimized/docute-client.js

CSS does not change

Build a local search plugin

Issuehunt badges

Using the plugin API for searching: https://docute.org/plugin-api#apienablesearchoptions


IssueHunt Summary

Backers (Total: $200.00)

Submitted pull Requests


Become a backer now!

Or submit a pull request to get the deposits!

Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

Allow plugin to parse doc content

Maybe expose beforeParse and afterParse:

function myPlugin(ctx) {
  ctx.beforeParse(markdown) {
    return manipulateMarkdown(markdown)
  }
  ctx.afterParse(html) {
    return manipulateHtml(html)
  }
}

Support history mode

If you're using github pages, you can use 404.html together with index.html to simulate a history-mode app (redirect 404.html to index.html), what we need to change is to make docute update location.hash instead query.id in history mode

Access Vue Variable on plugin

I want to create a plugin, but to create a plugin, I need to register a component first. Unfortunately I cannot create a Vue component because I can't access Vue variable from config.js where we usually init a plugin. The config.js is located before the docute js file.

Please help me on this.

Build to static html files

Just simply matching all markdown files, for example docute build docs -> glob.sync('docs/**/*.md') and we can get something like:

[ 'docs/cli.md',
  'docs/ja/cli.md',
  'docs/ja/plugins.md',
  'docs/ja/README.md',
  'docs/plugins.md',
  'docs/README.md',
  'docs/zh-Hans/cli.md',
  'docs/zh-Hans/plugins.md',
  'docs/zh-Hans/README.md',
  'docs/zh-Hant/cli.md',
  'docs/zh-Hant/plugins.md',
  'docs/zh-Hant/README.md' ]

and build to '.docute' folder, docs/cli.md => .docute/cli/index.html

with vue-server-renderer it should not be hard.

Icon/Logo design

It's nice to make a icon or a logo, could be used as favicon.ico or shown in such tool:

2016-12-16 1 09 49

Support progressive web app

[draft] Adding progressive web app support:

self.$config = {
  pwa: true
}

And then put sw.js (serviceworker) to the path of your docs.

Optimization for wide screens

In current layouts, contents will take up as much space as they can. On my 1080p monitor, it's a bit hard to read text from leftmost to rightmost. What about adding a max-width property to contents and align them in the center?

screenshot

Add "edit on github" icon in header

And set prefix by edit-on-github option:

self.$config = {
  // for example:
  'edit-on-github': 'https://github.com/egoist/docute/blob/master/docs'
}

doc: navbar => nav

---
navbar: chinese
---

=>

---
nav: chinese
---

It really took me long time to find out the error.

Cannot Put Remote URL On Navbar

Is there any way I can do this on config file?

nav: {
    default: [{
       title: 'Documentation', 
       path: 'https://raw.githubusercontent.com/ctrlplusb/react-universally/master/docs/NPMCommands.md'
     }]
  }

Where the path is remote URL instead of local markdown. I tried but it cannot load the markdown.

The readability of highlight.js is really bad

Sorry for bothering again 😂. As you can see from the screenshot below, the syntax highlight of highlight.js is really hard to read, it seems almost everything is black and thus messing up:

screenshot

Since this is an internal module, I could not modify it 😢. Would you mind switching to the other plugins like the old Prism.js?

Search in docs

Currently there's no universal way to search a keyword in markdown files, the last option I can think of is to generate a json file for these files for searching 🤔 but um.. you need to generate each time after you updated the docs ...

suggestion: set default dropdown item

I need to set a dropdown like this

- All Components  `/components`
- Form Components `/components_form`
- layout Components `/components_layout`

when users click the dropdown, it goes to /components without selecting.
And when users select Form Component, the dropdown title should be changed to Form Components.

Now it seems impossible to do this.

Better 404 page

When the ajax call returns a 404 status code it renders the 404 page

[suggestion] change the route of home page

After I added landing page, the route of home page will be locked in /#/home. It would be helpful if I can change the route of home like, hm, guide, since I am using it as Getting started page.

Convert id in link

For [Introduction](#introduction) we will get a link like <a href="#introduction" ... but it should be <a href="?id=introduction" in docute.

maybe just convert to <a jump-to-id="introduction"

How to add pagination?

docute is very cute 👻 . It is awesome documentation tool. but Where can I find pagination?

[question] Living component guide

Hi there, thanks to put this together, docute is really awesome.

I'd like to create a living component like style guide, showing different states of some components, also show some tabbed content, like preview and source code (maybe some markdown plugin to show tabs?).

Is this some how supported by docute? If so, what would be the best approach to author such style guide using docute?

Thanks!

Better mobile experience

Hide sidebar and add a breadcrumb icon in header to toggle it, we can also put the navbar in sidebar, just like how vuejs.org looks like.

Support markdown link context

If a link in markdown is relative path or absolute path, we can use context to change the url, this would be useful if you're loading external markdown file:

self.$config = {
  marked: {
    linkContext: 'https://raw.githubusercontent.com/user/repo/master'
  }
}

[feature request]cover/landing page support

Noticed that cover pages have been supported by docsify since a recent update (well, I don't know the exact version...). As most open source projects are serving an appealing landing page, I think it would be great if we could also create a cover or landing page for docute :)

Custom sidebar

some people may want to custom their sidebar with pages instead of using navbar.

we can allow this by:

self.$config = {
  sidebarNav: [
    // exactly same usage as `nav` but display in sidebar
    {title: 'About me', path: '/'}
  ]
}

And replace TOC with this.

Expose some internal variables and methods

I can see the benefits if user can access router and vuex store or even Vue constructor:

window.docute = {}
docute.router = vueRouter
docute.store = vueStore
window.Vue = Vue

Support gitbook-like behavior

a gitbook mode, which means you can provide a summary.md to set the sidebar menu:

- [Get started](get-started.md)
- [Advanced](advanced.md)

Then we won't parse and set toc in the sidebar but instead use the custom menu, it's like the nav but moved to sidebar ^_^

put routers at left instead

目前的docute是只能把导航栏放在顶部,而左侧的导航栏只能导航一个MD文件的标题。

但是,有很多情况下,是MD文件较多,需要把路由放在左侧能更加方便(忽略MD页面内部导航)。比如:http://ionicframework.com/docs/

请问这种情况下,我该怎么使用docute?谢谢。

CLI tool in other languages

the docute-cli is just a scaffolding tool and a server with live reloading, it would be easy to implement in other languages, like golang.

The idea to make it in other languages is to enforce that you don't even need node.js installed for making docs, use the language you desire instead.

Support more icons

  • weibo
  • zhihu
  • facebook
  • linkedin
  • profile
  • ...

Anyone is good at drawing svg icon? 😃

Scroll spy

Add active class to relevant sidebar item when scrolling

想了解一下关于搜索这一块

这个地址:https://docute.js.org/#/home

左上角有搜索框,想了解它的具体点实现?

比如说应该怎么配置,才能出来?

另外想了解的是如果是多个md的话,这个搜索,会不会针对所有的md进行搜索,还是针对当前的md进行搜索?

Multiple navbar

There's such use case:

A navbar for English doc /#/, but use another navbar for Chinese doc /#/zh-cn/*

So we can allow this by setting front-matter in your markdown file:

---
navbar: chinese
---

And update your config.js to:

self.$config = {
  nav: {
    default: [{title: 'About', path: '/en/about'}],
    chinese: [{title: '关于', path: '/zh-cn/about'}]
  }
}

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.