Code Monkey home page Code Monkey logo

gitdocs's People

Contributors

etimberg avatar luciofranco avatar tannerlinsley 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

gitdocs's Issues

Create init command

  • checks for existing docs and adds a .gitdocs config file if necessary
  • if no docs, it generates a docs folder with proper examples/boilerplate

Sidebar state fails to persist on reload

If the sidebar is open or navigated to a subsection, on reload that section will be folded. I would expect it to retain the same state, and be open the currently displayed subsection.

Headers should be hyperlinked

When clicking a top level header, it should append the location as a hash to the url so that I can link others to a certain part of the document. The way GitHub does it would work well, when you hover you actually see a little link icon: https://cl.ly/0L0I1B14180X.

Support relative doc links

If I'm in a file called usage/index.md I should be able to create a markdown link to /logging.md and have that automatically route to docs/usage/logging.md.

*edit: would also be good to be able to reference "absolute" doc urls like /docs/usage/logging.md from any other doc.

No errors when markdown file was invalid

I created an index.md file under a directory and saved it while dev server was running. The file did not have a heading, and in that case I think failed to render but no error message was surfaced or received. I would expect to see a log line or warning or something to indicate I did something wrong.

Relative routes to assets don't work

Prenote: I don't use a docs.json for my tests.

In my docs I have a common 'assets' directory, containing all my imagery.

assets
imageA.png
fileA.md
folderA
fileB.md

To link imageA.png from fileA.md I use:

![](assets/imageA.png)

To link imageA from fileB.md I use:
![](../assets/imageA.png)

Both fail to link and both files are linked against:
/assets/imageA.png

You can also check this in your docs at markdown.md#links

SyntaxError: Unexpected token import

I just installed git docs globally with yarn, then get this error when running gitdocs init. Is there another dependency I need installed? I'm assuming it's something to do with babel, but my understanding is that babel best when installed per project opposed to per device (https://babeljs.io/docs/usage/cli/). I may just be missing something here.

npm -v
5.6.0
node -v
v9.5.0

Allow `draft` status in front matter

Just an idea, there is some documentation I'd like to add but don't want it to be public yet. Supporting a draft status in the front matter that wouldn't display the doc in the navigation would be nice.

Enable CI

Now that we have a lint command, yarn lint, and a test command, yarn test we should run these on a CI for every commit to master and every PR.

Gitdocs server crashes if a directory name is changed

If you change a directory name and reload the site while on that path, the server will crash. While we would expect an error since that path no longer exists, I think it should be gracefully handled as the paths are used to generate links and navigation menus. I feel like changing these names will be part of a standard editing workflow.

Create comparison documentation

It would be nice to see how gitdocs stacks up against docusaurus, gitbook, docsify, etc.

  • custom components (tips, highlight, mermaid, etc)
  • bring your own components (in progress)
  • support for prism & highlight.js
  • progressive react app (allows for interactive components and fast browsing speeds)
  • statically rendered (great for seo)
  • true routes (no hash routing)
  • automatic table of contents
  • automatic site generation based on folder structure
  • infinite documentation nesting

Static assests

Should copy contents of _static into the output folder during serve and build. Add it into the connect middleware for the server.

Default themes

Add default themes you can choose from using your docs.json

Command failed: cd node_modules/gitdocs && node_modules/react-static/bin/react-static start

Somethings (obviously) missing 😉

Any idea?

Andy

`/usr/local/lib/node_modules/gitdocs/node_modules/yargs/yargs.js:1100
else throw err
^

Error: Command failed: cd node_modules/gitdocs && node_modules/react-static/bin/react-static start
at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at Object.handler (/usr/local/lib/node_modules/gitdocs/bin/gitdocs.js:32:7)
at Object.runCommand (/usr/local/lib/node_modules/gitdocs/node_modules/yargs/lib/command.js:228:22)
at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/gitdocs/node_modules/yargs/yargs.js:1013:30)
at Object.get [as argv] (/usr/local/lib/node_modules/gitdocs/node_modules/yargs/yargs.js:957:21)
at Object. (/usr/local/lib/node_modules/gitdocs/bin/gitdocs.js:72:3)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)`

Permalink in frontmatter

When building the manifest, check for this before assuming the url based on the file structure. Also put in a check to prevent duplicate urls.

Resizing window causes bad glitching

Both vertical and horizontal window resizing causes page reflow, and for some reason, causes images to reload completely as well. My guess is something to do with the responsive size detection and rerenders. You can see it if you go to react-static.js.org and resize the window, though it's much worse on mobile.

Only include necessary libraries during build

When working on #38 I noticed that all possible components are included in the built file. These components are used https://github.com/timberio/gitdocs/blob/master/src/components/Markdown/index.js#L24-L34

As we add new, more complex components, we should either:

  • Use code splitting to only load libs when needed
  • Only include the react components that are used. If we provide a <Video> component, then it should only be included in the bundle if we actually found one from the markdown files

asciidoc support

Somewhat popular and powerful text based formatting lang, supported by readthedocs.org.

GitDocs `add` command

While working on porting some docs, I noticed this would be helpful. I'd like to be able to run something like gitdocs add node/http and automatically have a file generated at that route for me, pre-filled with appropriate front matter.

"hash mode"

Instead of generating a full static site with folders/subfolders this could work like docsify.js.org and be ideal for deployment on github pages.

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.