Coder Social home page Coder Social logo

drassil / git-wiki-theme Goto Github PK

View Code? Open in Web Editor NEW
206.0 8.0 292.0 538 KB

A revolutionary full-featured wiki for github pages and jekyll. You don't need to compile it!

Home Page: http://drassil.github.io/git-wiki/

License: MIT License

HTML 34.40% CSS 20.95% JavaScript 4.83% Shell 0.28% SCSS 39.54%
wiki github-pages jekyll pull-requests wikipedia git free

git-wiki-theme's Introduction

git-wiki

Git-wiki is a modular and full featured wiki powered by Git, GitHub/Gitlab Pages and pull requests!

The git-wiki project is composed by 3 different repository:

  • git-wiki-theme: This is the repository of the theme that implements the wiki functionalities. You would have not fork it unless you need to send a Pull Request or create your wiki project from scratch.

  • git-wiki-skeleton: This is the repo that you should fork or use as a template. It uses the jekyll remote theme functionality that allows you to create your own wiki based on git-wiki-theme. By using the remote functionality you can automatically keep your wiki always updated with latest features from the git-wiki-theme, but you can also fully customize it.

  • git-wiki: This is the documentation repository and website of the git-wiki-theme project. You would have not fork it unless you want to contribute to the git-wiki project documentation.

Getting started

The easier and faster way to use git-wiki is the "skeleton" method.

You don't need to install anything locally!

  1. Simply fork/clone skeleton repo or click on the "Use this template" button to create your copy of the skeleton project.

  2. Edit _config.yml and other pages as you need and then deploy it on GitHub/Gitlab Pages.

Done! Now wait that your page will be published and you're ready to wiki!

Features

  • Improvements in the cooperative aspect: forks, pull requests and roles.
  • You can customize your wiki as you want with stylesheets and even changing the layout (see customization section below).
  • No databases! Only static files that can be downloaded in a few seconds.
  • Blazing fast and free thankfully to GitHub/Gitlab Pages and Jekyll Server Side Generation process!
  • Markdown and HTML mixed together!
  • Multiple free search engines! on a static site!
  • History, revision comparison and everything you need from a wiki platform.
  • You can edit your pages with the standard git editor, prose.io (integrated) or any kind of editor you prefer.
  • Non-existent wiki page links are "red", you can click on them to automatically create a new page!
  • External links get the right icon automatically.
  • Component system with hooks that allows you to completely customize your wiki UI (see customization section below).
  • Some nice internal themes to change your entire wiki UI with 1 simple configuration (see customization section below).
  • Integrated Blogging feature thanks to Jekyll!
  • Automatically generated TOC!
  • You can download the entire wiki for offline usage and even navigate directly using a Markdown reader!

You can use it with the Jekyll "remote_theme" feature or fork/copy the master branch and start your wiki in just 1 minute.

Instructions and full documentation: http://drassil.github.io/git-wiki

git-wiki-theme's People

Contributors

fredster33 avatar kpfleming avatar nekketsuuu avatar tailot avatar vaionicle avatar yehonal 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

git-wiki-theme's Issues

[GENERAL] How do I edit the build script?

Hi, I would like to edit the build script on actions to update the site incrementally. This way the site would rebuild with each change, rather than having to rebuild the whole site with every change. This would help a lot with large wikis as well as popular ones. Changes would go live faster. Thanks.

POSTS not REFLECTING

Describe the bug
A clear and concise description of what the bug is.

So I just added a new post on my wiki and its not reflecting My Wiki

Added wiki on GitHub

I thought the issue was the way I had named the file and renaming it doesn't fix it.

Further digging in I can see we made changes on the _config.yml file. Here is the diff and I am not sure can that be the root cause?

Logo URL cannot be relative

Describe the bug

_config.yml.dist says that logo_url is "Url of logo image, it can be full, absolute or relative", but it cannot be relative. If the URL is relative, then the logo is not displayed on blog posts which are in subdirectories.

To Reproduce

I used the gh-pages branch of this repository to reproduce.

  1. Change logo_url in _config.yml to be relative.

    --- a/_config.yml
    +++ b/_config.yml
    @@ -9,7 +9,7 @@
     show_wiki_posts: true
     show_wiki_posts_limit: 5
    -logo_url: http://drassil.github.io/git-wiki/assets/images/1200px-Wikipedia-logo-v2.svg_.png
    +logo_url: assets/images/1200px-Wikipedia-logo-v2.svg_.png
     google_analytics:
     git_branch: gh-pages
    
  2. Go to git-wiki/blog/posts/2018/12/17/first-post.html.

  3. The logo is not displayed. See a screenshot below.

Expected behavior

The logo is displayed correctly.

Screenshots

a logo on upper left is not displayed

Desktop:

  • OS: Windows 10
  • Browser: Google Chrome
  • Version: 79.0.3945.88

Additional context

There are also small issues related to the logo. I noticed:

  • The logo is not displayed when logo_url is relative. (Main issue)
  • When being the mobile layout, a img tag for logo is generated even if logo_url is not set (this line).
  • On the gh-pages branch, logo_url is using HTTP, not HTTPS. This may cause the mixed content error. Currently this error doesn't occur because //www.drassil.org/ is served over HTTP (on the other hand //***.github.io/ is served over HTTPS).

main_page.md.dist is confusing

Is your feature request related to a problem? Please describe.

The file /wiki/main_page.md.dist can be confusing when creating a new wiki from scratch.

First, if we just copy the master branch of Drassil/git-wiki and build it with Jekyll, the root page / shows a HTML page generated by /README.md thanks to jekyll-readme-index.
In order to configure, we can create /_config.yml and /wiki/main_page.md. Here, if we leave /wiki/main_page.md.dist by copying it to /wiki/main_page.md instead of renaming, the root page / is redirected to /main_page.md (not /main_page) and it is redirected again to an edit page to create /wiki/main_page.md. This is because jekyll-redirect-from handles not only a YAML header of /wiki/main_page.md but also that of /wiki/main_page.md.dist.

This confuses me. We must rename/delete /wiki/main_page.md.dist to construct a wiki correctly.

Describe the solution you'd like

In order to avoid this, how about renaming /wiki/main_page.md.dist to /wiki/main_page.md in this repository and writing quick start instructions on /wiki/main_page.md? I think it is better that we can construct the very first wiki by just forking the master branch. Also renaming /_config.yml.dist seems good if you want. I can send a pull request if needed.

Describe alternatives you've considered

Alternatively, write more install instructions or notes on README.md.

Add New Post Unknown ISSUE

Describe the bug
Trying to add a new post from the add new post button seems to open a new file in Github that one can't commit.
I think the issue lies in how the target path is defined but I am not 100% sure.

image

To reproduce
Steps to reproduce the behavior:

  1. Go to Add new post button on the top right corner
  2. Click on it
  3. Place a test.md on the new file window on github and maybe a test content then try and commit.
  4. See error

image

[GENERAL] Supporting mdpp files?

Greetings, and good afternoon. I was wondering if it is possible, to support mdpp files.

I'm trying to make table under pages of wiki like wikipedia, but md file does not support including other md files. So, I made a mdpp page but wiki seems to be not working on mdpp. I'm not sure if it is on configuration.

Thank you in advance for any information in this regard.

[GENERAL] Using Git Wiki without github pages

I'm thinking of using the awesome work done with github wiki on other platforms, like netlify / netlify cms.

How should I go about doing this to phase out the github pages specific parts?

Thank you for your help.

How about adding style guide?

Is your feature request related to a problem? Please describe.

Currently, some coding style of Liquid and YAML are not unified. This is a bit confusing when writing codes for pull requests.

Example 1: Should we add spaces or not?

<a target="_blank" href="{{ site.github.repository_url }}/wiki/{{url | remove: '.html' | append: ''}}/_edit">Edit</a>

Example 2: Should we add a space before colon?

use_prose_io: true
service: github
search_engine : "js"
google_cse_token: 007197903287787072094:8rbvkeqo6qw
wiki_folder : "wiki"
permalink: /blog/posts/:year/:month/:day/:title:output_ext

Describe the solution you'd like

How about refactoring the current code and writing a style guide? One example I googled is this.

jekyll build issue under jekyll v3.7.2

Hi,

I can use "jekyll build" and "jekyll serve" to check the result locally on my PC.
But I only see a folder tree, when I try git-wiki, like this:
http://127.0.0.1:4000/
`

Name Last modified Size
Parent Directory 2018/02/16 23:10 -
404.html 2018/02/16 23:11 2816
LICENSE 2018/02/16 21:57 1078
assets/ 2018/02/16 23:10 -
feed.xml 2018/02/16 23:11 486
index.md 2018/02/16 22:01 12
redirects.json 2018/02/16 23:11 2
robots.txt 2018/02/16 23:11 43
sitemap.xml 2018/02/16 23:11 285
sync-wiki.sh 2018/02/16 21:57 244

`

Translating documents.

Greetings, and good afternoon. I was wondering if it is possible, to translate the documents in different languages. From what I have seen in some projects, inside the wiki folder, one would create one with the language folder, but what I don't understand, is in what way, then the wiki, could detect the different languages, and offer them. To begin with, I would have to create something in the url, where I add the different languages: /en/, /es/, /it/. Thank you in advance for any information in this regard.

Case sensitive links

I would like to suggest that we somehow fix so that case sensitivity doesn't matter in URLs for the wiki.

Next button in posts/blog is buggy

Describe the bug
The next button in my wiki blog/posts is just buggy, it doesn't show the other posts but shows empty page using the theme for my base/home

To reproduce
Steps to reproduce the behavior:

  1. Go to https://wiki.th3-gr00t.tk/
  2. Click on read all under posts
  3. Scroll down to the end then click next
  4. See empty output

Expected behavior
Empty output nothing on page 2

Tried editing config but nothing fixed it. Also seen the Drassil/git-wiki-theme@master has alot of new files/features than my version. Why am I not receiving any feature updates?

Screenshots
image

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]
  • Browser: [e.g. chrome, safari]
  • Version: [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser: [e.g. stock browser, safari]
  • Version: [e.g. 22]

Additional context
Add any other context about the problem here.

Dark theme breaks

In mobile version of the website while scrolling down the dark theme breaks , and will show the light theme instead.

WikiName as page title

I want to make WikiName as page title, that is , show as h1 at top of the page.
I think GitHub wiki or other standard Wiki treat their WIkiName as page title.

Is there some configuration to do it?

Add way to write sidebar in Markdown

Is your feature request related to a problem? Please describe.

Currently, contents in sidebar is written in HTML using sidebar.html and inc_before_page_list. But this feels strange to me because other wiki pages are written in Markdown. I was surprised a little when GitHub shows HTML after pushing the "Edit" link in sidebar of http://www.drassil.org/git-wiki.

Describe the solution you'd like

Add a way to use sidebar.md instead of sidebar.html.

Possibly related?

jekyll/jekyll#1303

{% capture my_include %}{% include a_markdown_file.md %}{% endcapture %}
{{ my_include | markdownify }}

Are there any thoughts on this proposal?

Title is not escaped

Describe the bug

Strings such as title are displayed without escaping. Therefore, for example, git-wiki's layout breaks when title contains some special characters.

To Reproduce

  1. Create a page of a particular title.
  2. Some wiki content breaks.

I consider some examples:

  • When a page title contains a HTML tag, it's not escaped and displayed as HTML.
  • When a page title contains a double-quote, links are broken.
  • Also, other strings such as a site title and a git branch name can break

Expected behavior

Properly display every string.

Screenshots

I prepare a proof of concept of this bug. See https://github.com/nekketsuuu/git-wiki-70-noescape.

screenshot of wiki which some strings are bold

In this screenshot, some strings are bold because of a <strong> tag in a title. Links in upper right are broken because of a double-quote in a title.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Google Chrome
  • Version: 79.0.3945.88

Suggestion: Dark Theme

I think the wiki would be even better if it had a possibility to have dark theme, for instance it can detect what your current theme in Windows 10 and then change the theme to dark mode if that's what you have.

Want to see a good example of what my suggestion is? https://docs.discord4j.com/ Here is one of the websites I think personally implemented dark theme in the best way possible, except github of course :D

Happy to hear your thoughts and some feedback on the idea.

Improve Sidebar Functionality


name: Feature request
about: Improve sidebar functionality
title: ''
labels: ''
assignees: ''


Improve Sidebar Functionality

Is your feature request related to a problem? Please describe.

Escape key, clicking outside of the sidebar, and clicking on internal page navigation links within sidebar do not close sidebar.

Describe the solution you'd like

  • Close sidebar when escape key is pressed
  • Close sidebar when click is registered outside of sidebar

Describe alternatives you've considered

I've made a functional update for Talon Wiki with the behavior listed above here, but it's written in javascript and changes a few things such as element IDs that you may choose to do differently.

Additional context

Thanks for building a great tool, I'd like to give back a little if able :)

Dark Mode Doesn't Apply to Mobile Header

Describe the bug
On mobile, enabling dark mode keeps the header in light mode but inverts the color of the logo.

To reproduce
Steps to reproduce the behavior:

  1. Go to any page on a mobile device (or with a browser window resized such that the mobile header is visible.
  2. Enable dark mode.
  3. Observe the color of the mobile header.

Expected behavior
The header should have it's colors inverted, but the logo should not.

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Browser: Firefox
  • Version: 117.0.1

Smartphone (please complete the following information):

  • Device: iPhone 13 Mini
  • OS: iOS
  • Browser: Safari, Chrome
  • Version: iOS 17.0.1

@ItsTrashPanda and @CRImier have also reproduced the issue.

Implement collapsible header/sidebar

The header (left sidebar) should be collapsed on small displays. Currently it's displayed on top and can be quite long making the wiki unreadable.

Modularize Git-Wiki for version 2.0

I'm rewriting the entire git-wiki code to be modular.

With an architecture based on modules/components you will be able to compose your custom theme using git-wiki elements without the need of changing default code, it also will allow you to keep your wiki updates in sync with original git-wiki project.

What will be done:

  • Configurations to change the default layouts to custom ones

  • Layout will be splitted in various "partials"/"components" that will be included in our default layout, you can reuse such components to compose your custom layout.

  • Hooks (such as before_footer, after_footer etc.) will be added to allowing you use our default layout extending it with new parts.

GitHub links like `Add new` should work for `wiki_folder=""`

Describe the bug
If wiki_folder is an empty string, the GitHub links are broken because they assume that the wiki pages will always go into a folder (i.e. wiki_folder is never "").

I'm building a wiki where the whole site is a wiki. I don't necessarily need pages to be in a folder - I'd like to put them in the root directory. (Alternatively, I wanted to put them in a directory, but I couldn't find a way to not have that folder as part of the url path for the pages, and I don't want my users to need that extra bit in the url. Permalink doesn't seem to affect the entire url path.)

It would be great if the code in _includes/git-wiki/components/action_btn/page_actions.html would also work for the wiki folder being the root directory:

    <span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/new/{{site.git_branch | escape}}?filename={{ site.site_root | default: '/' }}{{ site.wiki_folder }}/">Add new</a></span>

To reproduce
Steps to reproduce the behavior:

  1. Set wiki_folder to empty string
  2. Click on Add new
  3. Try adding a new page
  4. See error:
    image

Expected behavior
Adding a new file via the Add new link with the wiki_folder set to the home directory (i.e. wiki_folder="") should successfully add a new file to the root of the project.

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome

Integrate liquid TOC generation?

Perhaps this would be something to consider? https://github.com/allejo/jekyll-toc

It seems to me that to have a "static" TOC one would currently need to manually set the paths. The "recently updated post TOC" is not particularly helpful for navigation when new posts are included. Would this solve the issue?

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.