Giter Site home page Giter Site logo

ianjsikes / md-graph Goto Github PK

View Code? Open in Web Editor NEW
33.0 2.0 9.0 4.3 MB

A Visual Studio Code extension to visualize your markdown files as a network graph. Easily navigate files and see relationships.

License: MIT License

TypeScript 91.91% JavaScript 4.31% CSS 2.59% HTML 1.20%

md-graph's Introduction

md-graph

Adds command Show Graph that displays a graph of local links between Markdown files in the current working directory.

Gives better insights into structure of your files if you are writing a wiki, a Foam notebook or documentation.

This is a fork of tchayen/markdown-links.

Demo GIF

Workflow

Recommended workflow is either keeping the graph open and using it as an alternative to the explorer sidebar or checking the it from time to time.

The graph refreshes automatically every time you:

  • Update a Markdown title of the file.
  • Change links to other files.
  • Create a new file and add give it a title.
  • Remove a file.

When active file in the editor changes and it matches one of the files in the graph – it will be highlighted.

Concepts

  • Title is always the first Markdown heading of depth 1, i.e. # Title.
  • Files which do not have a title do not appear in the graph.
  • Files can link to other files using local Markdown links or Wiki Links.
  • The graph is not directed. It doesn't show which file has the link and which one is linked.
  • Directory structure is not relevant for the graph. All that matters is the mutual links between files.

Example

# Title

Link can be present in [text](first.md) or on a special list.

## Linked

- [Second](./2.md)
- [[third]] - Links to `third.md`

Named reference can also be used, like this: [reference].

[reference]: ref.md

Settings

This extension contributes the following settings:

md-graph.showColumn

Controls in which column should the graph appear. Refer to Column values. Defaults to beside.

md-graph.openColumn

Controls in which column should clicked files open. Refer to Column values. Defaults to one.

Column values

  • active – in the currently focused column.
  • beside – other than the current.
  • one (default), two, three, four, five, six, seven, eight, nine – respective editor columns.

md-graph.autoStart

If true, opens the graph when you open VS Code. Defaults to false.

md-graph.fileTypes

An array of file extensions that will be parsed to generate the graph. Defaults to ["md"].

md-graph.graph.defaultMode

Controls the default graph viewing mode.

  • "ALL" shows the full graph of every file in the workspace.
  • "FOCUS" only shows the currently open file and its neighbors.

Defaults to "ALL"

md-graph.graph.focusNeighborDepth

Controls how many levels of neighbors should be shown in focus mode. Defaults to 1

md-graph.graph.fadeDepth

Controls how far away a file should be from the current file before its node is faded. Set to 0 to not fade any nodes. Defaults to 1

Roadmap

Refer to the GitHub project board

Changelog

Refer to the CHANGELOG.md file.

Contributing

You are very welcome to open an issue or a pull request with changes.

If it is your first time with vscode extension, make sure to checkout Official Guides.

md-graph's People

Contributors

ianjsikes 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

Watchers

 avatar  avatar

md-graph's Issues

Add option to ignore certain files

I have a single file that works as an index to almost all other files. In Obsidian I also use a graph, where I can ignore this index.md file.

Omitting my index will give clearer results as I won't see all notes, but just the ones that are linked to each other directly, not just by both being present in my index file. Of course, other usecases could be thought of, so please add something where a pattern can be given for filenames to ignore.

Focus Links don't seem to be detected across separate folders

In Focus mode, the only links detected (both incoming and outgoing) seem to be for files co-located in the same folder as the main note.

Would expect it to search the entire workspace for associated links, as Foam graph and Dendron graphs do

Links don't work when the md title has spaces

If I have a markdown file named "Camping List.md", then when I make a link to it from another md file that link will be formatted as Test because of how markdown works. But because my link has %20 and the name of the file in my file system doesn't, this breaks the extension. When I name the file "Camping%20List.md" then the extension works again.

Please add some feature whereby spaces in file names are converted to %20 so they match with markdown links.

VSCoduim

I cant install this extension in VSCoduim, is there any ideas how I can use it with that version of VC?

Add better descriptions for settings options

Some of the settings are unclear. What is a column? What is the difference between "Open Column" and "Show Column". What is the difference between "Fade Depth" and "Focus Neighbor Depth"?

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.