Giter VIP home page Giter VIP logo

gatsby-project-kb's Introduction

gatsby-project-kb

Here is a project developing a gatsby theme for publishing Knowledge Base.

You can check out the demo and documentation.

If you are looking for gatsby-theme-kb, go to directory packages/gatsby-theme-kb for more detailed docs.

Development

File structure:

├── demo // the demo site's code
├── packages
    └── gatsby-theme-kb // the Gatsby theme
├── yarn.lock

This is a common structure for developing Gatsby theme using yarn workspace. You can check more on Gatsby official tutorial Building a Theme.

Run it locally

yarn # install dependencies
yarn dev # start devlopment

Support

Feel free to open issues if you have any problems or suggestions for this project, I will do my best to solve them in my spare time.

If you find it useful and find yourself in a mood of sunshine, you may support me a little pack of coffee beans.

I like Geisha, you will like it, too.

Buy Me A Coffee

gatsby-project-kb's People

Contributors

andrewnatoli avatar hikerpig avatar jessems avatar rharink avatar snyk-bot 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

Watchers

 avatar  avatar  avatar  avatar

gatsby-project-kb's Issues

Local images are not working

I tried to add images to one of the notes and when I start the server, they are not resolved.

Inside of the content folder I create a new folder called "assets" and configured both Obsidian and Logseq to use it for storing attachments or other static resources. As you can see they display the image correctly:

CleanShot 2022-03-23 at 08 18 32@2x

However the online version looks like this:
CleanShot 2022-03-23 at 08 17 36@2x

CleanShot 2022-03-23 at 08 17 50@2x

This is how the project structure looks like:
CleanShot 2022-03-23 at 08 18 00@2x

Am I doining something wrong?

CJK characters in slug

Up to [email protected] , I use slugify(fileName) to generate url slug.

But this function will not keep most of the utf-8 characters. For example 认知.md will be an empty string, makes navigation imposibble.

Backlinks in TOC

Spotted a bug, clicking on "Backlinks" in TOC doesn't scroll down to Backlinks

image

shadowing CSS

hey, i'm having a tough time shadowing the theme.css and vars.css.

none of those directory variants work. The site builds, but the CSS is untouched:

src\foam-template-gatsby-kb\styles\*.css
src\foam-gatsby-kb\styles\*.css
src\gatsby-project-kb\styles\*.css
src\gatsby-theme-kb\styles\*.css
gatsby-theme-kb\src\styles\*.css
src\@hikerpig\foam-template-gatsby-kb\styles\*.css
src\@hikerpig\foam-gatsby-kb\styles\*.css
src\@hikerpig\gatsby-project-kb\styles\*.css

The source and version history can be found here: https://github.com/lenowac/wiki

I understand that OSS comes without support, but in case you happen to have some spare time, I'd really appreciate a little help. In case you don't, that's very understandable :)

Best regards, lenowac ^^

Backlink on a backlink preview seems broken

image

eg:
the "hello world" has a backlink to "graph view" which should take to /features/graph-view but instead it takes to /graph-vew

this is only happening on backlink previews

another eg:

image

should take to /examples/syntax-highlight but instead takes to /syntax-highlight

thank you

Migrating to Gatsby 4

It's been a while since Gatsby v4 released. Seems like there are a lot of new features in the new version.

I should take some time to:

  1. Publish a new version that is compatible with Gatsby v4
  2. Explore the new features and see if this theme can utilize them (like DSG)

Known issues:

Can't open pages that contain multiple words in their filename

Most PKM tools (e.g. Obsidian, Logseq, Foam) support files that contain multiple words and some special characters (e.g. " ", "-", "_").

Currently I am getting an error if I try to open a file that has space inside of its name. (e.g. "Digital Garden").

I would like to import my Obsidian vault and having to rename all my atomic notes to not have space in their file name is would something I would like to avoid.

Is there something I'm doing wrong?

Here are some screenshots to clarify the issue:
CleanShot 2022-03-19 at 11 03 31@2x

CleanShot 2022-03-19 at 11 00 15@2x

CleanShot 2022-03-19 at 10 59 58@2x
CleanShot 2022-03-19 at 10 58 28@2x

Sample library I would like to import and eventualy sync with Obsidian:

CleanShot 2022-03-19 at 10 55 51@2x

解决图片地址问题

您好,我的 md 文件都是采用本地存储的方式,例如:
image

可是在 yarn build 以后,在生成的文件中并没有将文件导出到 public 中,这个是什么问题呢?

Support dark mode for graph view

Thank @zubayrrr for pointing this out in issue #14 .
We should definitely improve the graph view in dark mode.
Today is monday and my daily work is occupying, so I may need another weekend for solve this.

image

Is there a way to make all files under a folder private?

I have a folder called ‘journal’ with lots of entries, each date as a standalone file. I would like to prevent this folder from being accessible, while still having it versioned by git.

Since making individual files format is already implemented, is there a way to make an entire folder private?

Support anchor reference

  • Should be able to link [[topic#anchor]]
  • Even better if the hover-over preview can auto-scroll to the pointed anchor.

Pages under folders can't be opened

Files under folders are not accessible, except from the sidebar.

Expected behavior:
Files can be open independently from the location where they are stored. (Same in Obsidian, Logseq, etc.)

See screenshot:
CleanShot 2022-03-21 at 20 05 29@2x

Rewrite the gatsby-transformer-markdown-references

Currently I'm using the gatsby-transformer-markdown-references from gatsby-digital-garden , but it has some shortcomings.

  1. Don't recognize settext heading === as title, which I regularly use.
  2. Don't recognize Foam style link definition (with file extension like file.md) as reference.

So I'm gonna fork and tweak it to fit gatsby-theme-kb's needs. Will also make #1 possible.

Add a 'Recently Updated' page

I Found this blog post about reading git history for 'last updated time' for a file. Add “Updated At” To Your Gatsby Blog | by Nikola Đuza | Feb, 2021 | Level Up Coding

Possible solution

  • https://www.gatsbyjs.com/plugins/gatsby-transformer-gitinfo/ This plugin is mentioned in the blog post. Though I may need some tests for building performance.
  • Add a '/recently-updated' page in the gatsby-theme-kb. But I somehow sense the need of separating it as a gatsby plugin. Let me see how it goes.

Example for using .mdx

Very cool project! Having trouble getting imported components to render in .mdx on my kb, would it be possible to include an example in the demo?

Latex Support

Latex Support

How to add the latex support.
I tried the following but this isn't working

{
      resolve: 'gatsby-theme-kb',
      options: {
        contentPath: path.resolve(__dirname, 'content'),
        rootNotes : 'readme',
        wikiLinkLabelTemplate: '[[{{ title }}]]',
        getPluginMdx(defaultPluginMdx) {
          defaultPluginMdx.options.gatsbyRemarkPlugins.push({
            resolve: 'gatsby-remark-prismjs',
            options: {
              noInlineHighlight: true,
            },
            resolve: `gatsby-remark-katex`,
            options: {
              // Add any KaTeX options from https://github.com/KaTeX/KaTeX/blob/master/docs/options.md here
              strict: `ignore`
            },
          })
          return defaultPluginMdx
        },
      },
    },

As I'm new to gatsby and gatsby shadowing. Please correct me, where am I wrong.
Thanks.

Backlinks mention duplicate links

The backlinks reference shows duplicates of a mentioned link(in the note), shouldn't backlinks mention the link only once regardless of how many times it was mentioned in the note?

image

Thank you again for this great theme, I'll try to fix these issues myself but I am still a noob.

Configurable sidebar sort behavior

A previous PR #58 changes the default sorting method of sidebar nodes from gatsby internal node id to file relativePath.

But since the sidebar displays article title rather than file path, it could be confusing sometimes.

It'd be better to make sorting method configurable to fit all possible needs.

Add comment plugin to this theme

It is possible to add utterances or GraphComment to the blog template in this theme?

Sorry. This is not an issue. Just a question
Thanks

Link preview position

Sometimes link previews' position looks glitchy.

image

edit: this only happens on lower resolution screen, my case is (1366x768).

Rough notation support

Hi, I was messing around with gatsby-theme-code-notes and I ported rough notations over to gatsby-project-kb,
do you think this feature will be a nice addition to gatsby-project-kb? if yes, I'll make a PR, thank you.

Here is the demo for rough notations

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.