Skip to content
Snippets Groups Projects
Commit ce604b64 authored by minshigee's avatar minshigee
Browse files

init git-wikit

parent 9716dac3
Branches
No related tags found
No related merge requests found
Pipeline #8574 canceled
Showing
with 231 additions and 305 deletions
FROM ruby:2.7.0
ENV LC_ALL=C.UTF-8=value
ADD . /srv/jekyll
WORKDIR /srv/jekyll
RUN bundle install --gemfile=.env-files/Gemfile.github
EXPOSE 4000
\ No newline at end of file
FROM ruby:2.7.0
ENV LC_ALL=C.UTF-8=value
ADD . /srv/jekyll
WORKDIR /srv/jekyll
RUN bundle install --gemfile=.env-files/Gemfile.gitlab
EXPOSE 4000
\ No newline at end of file
source 'http://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem "jekyll-gitlab-metadata" # for cross compatibility
\ No newline at end of file
source 'http://rubygems.org'
gem "jekyll-avatar"
gem "jekyll-coffeescript"
gem "jekyll-default-layout"
gem "jekyll-feed"
gem "jekyll-gist"
gem "jekyll-paginate"
gem "jekyll-mentions"
gem "jekyll-optional-front-matter"
gem "jekyll-readme-index"
gem "jekyll-redirect-from"
gem "jekyll-remote-theme"
gem "jekyll-relative-links"
gem "jekyll-seo-tag"
gem "jekyll-sitemap"
gem "jekyll-titles-from-headings"
gem "jemoji"
gem "jekyll-gitlab-metadata"
\ No newline at end of file
_site
Gemfile.*.lock
.sass-cache
\ No newline at end of file
image: elecnix/ikiwiki image: ruby:2.7.0
before_script: variables:
- git submodule init JEKYLL_ENV: production
- git submodule update LC_ALL: C.UTF-8
BUNDLE_GEMFILE: .env-files/Gemfile.gitlab
test: before_script:
stage: test - bundle install --gemfile=.env-files/Gemfile.gitlab
script:
- ikiwiki --setup ikiwiki.setup --libdir themes/ikistrap/lib
only:
- branches
- tags
tags:
- pages
pages: pages:
stage: deploy stage: deploy
script: script:
- ikiwiki --setup ikiwiki.setup --libdir themes/ikistrap/lib - bundle exec jekyll build -d public
artifacts: artifacts:
paths: paths:
- public - public
only: only:
- master - master
\ No newline at end of file
tags:
- pages
The MIT License (MIT)
Copyright (c) 2016 pages
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
![Build Status](https://gitlab.com/pages/ikiwiki/badges/master/build.svg) # git-wiki-skeleton
--- NOTE: it's fully supported by github platform, you don't need to install anything locally
Example [ikiwiki] website using GitLab Pages. This is a [skeleton](skeleton) repository that can be used as a template to bootstrap your wiki using "[remote_theme](https://github.com/benbalter/jekyll-remote-theme)" config
Learn more about GitLab Pages at https://pages.gitlab.io and the official For documentation, installation guide and demo of git-wiki-theme visit [THIS PAGE](http://drassil.github.io/git-wiki/)
documentation https://docs.gitlab.com/ce/user/project/pages/.
--- ## The git-wiki project
<!-- START doctoc generated TOC please keep comment here to allow auto update --> The git-wiki project is composed by 3 different repository:
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [GitLab CI](#gitlab-ci) - [git-wiki-theme](https://github.com/Drassil/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.
- [Building locally](#building-locally)
- [GitLab User or Group Pages](#gitlab-user-or-group-pages)
- [Did you fork this project?](#did-you-fork-this-project)
- [Troubleshooting](#troubleshooting)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> - [git-wiki-skeleton](https://github.com/Drassil/git-wiki-skeleton): This is the repo that you should fork or use as a template. It uses the [jekyll remote theme](https://github.com/benbalter/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.
## GitLab CI - [git-wiki](https://github.com/Drassil/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.
This project's static Pages are built by [GitLab CI][ci], following the steps Version: 1.0.8
defined in [`.gitlab-ci.yml`](.gitlab-ci.yml):
```yaml
image: elecnix/ikiwiki
before_script:
- apt-get install -y git
- git submodule init
- git submodule update
test:
stage: test
script:
- ikiwiki --setup ikiwiki.setup --libdir themes/ikistrap/lib
only:
- branches
- tags
pages:
stage: deploy
script:
- ikiwiki --setup ikiwiki.setup --libdir themes/ikistrap/lib
artifacts:
paths:
- public
only:
- master
```
We are using a theme based on Bootstrap 4 using submodules, and in order to
enable the theme plugin, we must pass the `libdir` parameter.
## Building locally
To work locally with this project, you'll have to follow the steps below:
1. Fork, clone or download this project
1. [Install][] ikiwiki
1. Clone the submodules: `git submodule init && git submodule update`
1. Generate the website: `ikiwiki --setup .ikiwiki/ikiwiki.setup --libdir themes/ikistrap/lib`
1. Preview your project: open `public/index.html` in a browser
Read more at ikiwiki's [documentation][].
## GitLab User or Group Pages
To use this project as your user/group website, you will need one additional
step: just rename your project to `namespace.gitlab.io`, where `namespace` is
your `username` or `groupname`. This can be done by navigating to your
project's **Settings**.
Read more about [user/group Pages][userpages] and [project Pages][projpages].
## Did you fork this project?
If you forked this project for your own use, please go to your project's
**Settings** and remove the forking relationship, which won't be necessary
unless you want to contribute back to the upstream project.
## Troubleshooting
1. CSS is missing! That means two things:
Either that you have wrongly set up the CSS URL in your templates, or
your static generator has a configuration option that needs to be explicitly
set in order to serve static assets under a relative URL.
[ci]: https://about.gitlab.com/gitlab-ci/
[ikiwiki]: https://ikiwiki.info/
[install]: https://ikiwiki.info/install/
[documentation]: https://ikiwiki.info/
[userpages]: https://docs.gitlab.com/ce/user/project/pages/introduction.html#user-or-group-pages
[projpages]: https://docs.gitlab.com/ce/user/project/pages/introduction.html#project-pages
remote_theme: Drassil/git-wiki-theme@master
# (string) Title of your wiki
title: "git-wiki-skeleton"
# (string) if you've installed your wiki in subfolder, you must change this configuration
# with your folder name, otherwise leave it empty
baseurl: "/git-wiki-skeleton"
# (string) Description of your wiki
description:
# (boolean) disable edit functionalities (edit/delete/add pages)
disable_edit: false
# (boolean) Enable/disable wiki page list in sidebar
show_wiki_pages: true
# (integer) Maximum number of wiki page to shown in sidebar
show_wiki_pages_limit: 10
# (boolean) Enable/disable blog feature
blog_feature: true
# (boolean) Enable/disable wiki posts list in sidebar (needs blog_feature enabled)
show_wiki_posts: true
# (integer) Maximum number of wiki posts to shown in sidebar
show_wiki_posts_limit: 10
# from jekyll (read jekyll doc)
paginate: 5
paginate_path: "/assets/blog/page:num"
permalink: /assets/blog/posts/:year/:month/:day/:title:output_ext
# (boolean) Enable/disable download buttons in sidebar
show_downloads: true
# (string) Specify branch rendered by gitpages allowing wiki tool buttons to work
git_branch: "master"
# (string) Url of logo image, it can be full, absolute or relative.
logo_url:
# (string) The UA-XXXXX-Y code from google analytic to enable GA on your wiki
google_analytics:
# (string) folder where wiki pages are stored, it's needed for tool buttons
wiki_folder: "wiki"
# (boolean) if you're using github wiki as submodule then this config
# must be enabled to allow tool buttons to work properly
use_github_wiki: false
# (boolean) Enable "Edit with Prose.io" button in tools, it's a 3rd party
# service to edit github markdown pages easily
use_prose_io: true
# Select search_engine component from:
# - js: it uses a built in javascript component that uses generated js object
# - js_rss: it uses a built in javascript component that uses generated sitemap_full.xml to search inside your wiki with lunr library (slow and experimental)
# - github : it uses internal github repository search
# - google : it uses cse search bar, you need to configure google_cse_token
#
search_engine : "js"
# Setting google custom search engine for google
# cse search bar (https://cse.google.it/cse/)
google_cse_token:
# (string) path of site root. Normally it's must be empty because _config.yml resides in the root of your repository.
# If you have _config.yml and your site in a subfolder, then change this config accordly
site_root:
#
# Jekyll configurations
#
# You can customize it changing default layout for all pages
# More info: https://jekyllrb.com/docs/configuration/
#
# git-wiki includes some internal themes that you can choose
# check _layouts folder
#
markdown: kramdown
highlighter: rouge
kramdown:
input: GFM
syntax_highlighter: rouge
defaults:
-
scope:
path: "wiki"
values:
permalink: /:basename
-
scope:
path: "" # an empty string here means all files in the project
values:
layout: "git-wiki-default"
-
scope:
path: ""
type: "pages"
values:
layout: "git-wiki-default"
-
scope:
path: ""
type: "posts"
values:
layout: "git-wiki-post"
-
scope:
path: "assets/blog"
values:
layout: "git-wiki-blog"
sass:
style: compressed
plugins:
- jekyll-avatar
- jekyll-coffeescript
- jekyll-default-layout
- jekyll-feed
- jekyll-gist
- jekyll-paginate
- jekyll-mentions
- jekyll-optional-front-matter
- jekyll-readme-index
- jekyll-redirect-from
- jekyll-remote-theme
- jekyll-relative-links
- jekyll-seo-tag
- jekyll-sitemap
- jekyll-titles-from-headings
- jemoji
- jekyll-gitlab-metadata
#
# INCLUDING HOOKS
# They are optional, change them only if you need
# Check wiki documentation to learn how they work
#
inc_before_toc :
inc_after_toc :
inc_before_content :
inc_after_content :
inc_before_footer :
inc_after_footer :
inc_before_head :
inc_after_head :
inc_before_meta :
inc_after_meta :
inc_before_scripts :
inc_after_scripts :
inc_before_styles :
inc_after_styles :
inc_before_header :
inc_after_header :
inc_before_tail :
inc_after_tail :
inc_before_tools :
inc_after_tools :
inc_before_page_list :
inc_after_page_list : sidebar.html
inc_before_post_list :
inc_after_post_list :
Menu (<a href="{{ site.github.repository_url }}/edit/{{site.git_branch | escape}}/_includes/sidebar.html">Edit</a>):
<ul>
<li><a href="{{ '/' | relative_url }}">Home</a></li>
<li><a href="{{ '/example-page' | relative_url }}">Example page</a></li>
</ul>
---
published: true
---
## Example post
This is an example post. You can edit it or create a new one
content/Anemones.jpg

85.3 KiB

# Bootstrap features
This page will contain a display of various features from Bootstrap.
They require some manual HTML tags.
Note that not all Markdown parsers allow Markdown markup inside all HTML tags.
In the case of ikiwiki, adding `markdown="1"` to `div` elements usually allows markup to be used inside them.
For a full list of features provided by Bootstrap 4, go to <http://v4-alpha.getbootstrap.com/getting-started/introduction/>.
<div class="jumbotron" markdown="1">
## Jumbotron
It's big and in your face.
---
You can still use Markdown syntax inside HTML blocks, if you are careful.
<a class="btn btn-primary btn-large" href="#">Button</a>
</div>
## Labels <span class="label label-info">Hi!</span>
Span elements work inside Markdown headings.
<div class="card card-block" markdown="1">
## Cards
Put a border with soft round corners around your content.
</div>
## Card decks
These require some more work.
You can use the `\[[!img]]` directive, but make sure to add `class="card-img-top"` or `class="card-img-bottom"` where appropriate.
For images in cards to work properly, they need to have their width forced to 100% of their container.
This is done in the `style.css` file that comes with ikistrap.
Another issue is that due to all the nested HTML tags, even with `markdown="1"`, Markdown markup does not get parsed anymore.
<div class="card-deck">
<div class="card-deck-wrapper">
<div class="card">
[[!img Lemonshark.jpg alt="Lemon shark" class="card-img-top"]]
<div class="card-block">
<p class="card-text">
A lemon shark and his little friends are out for a swim.
</p>
<p><a href="#" class="btn btn-danger">Escape</a></p>
</div>
</div>
<div class="card">
[[!img Anemones.jpg alt="Anemones" class="card-img-top"]]
<div class="card-block">
<p class="card-text">
Anemones look really nice and are much less dangerous than lemon sharks.
</p>
<p><a href="#" class="btn btn-success">Admire</a></p>
</div>
</div>
<div class="card">
[[!img Sea_Star.jpg alt="Sea star" class="card-img-top"]]
<div class="card-block">
<p class="card-text">
Sea stars are also less dangerous than lemon sharks, but they are slightly more dangerous than
anemones, <em>especially</em> when stepped on.
</p>
<p><a href="#" class="btn btn-warning">Sidestep</a></p>
</div>
</div>
</div>
</div>
## Card columns
These can be created by writing the outer card-columns `div` elements yourself,
and using `\[[!inline]]` with `template="simplecard"` to generate the cards.
<div class="card-columns">
[[!inline pages="sample_text/* and !*/Discussion" template="simplecard" feeds="no"]]
</div>
## Carousel
These can be created by writing the outer two carousel `div` elements yourself,
and using `\[[!inline]]` with `template="carouselpage"` to generate the carousel items.
<p>
<div id="carousel-example-pages" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators"></ol>
<div class="carousel-inner" role="listbox">
[[!inline pages="sample_text/* and !*/Discussion" template="carouselpage" feeds="no"]]
</div>
<a class="left carousel-control" href="#carousel-example-pages" role="button" data-slide="prev">
<span class="icon-prev" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-pages" role="button" data-slide="next">
<span class="icon-next" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</p>
If you only want to show images, use `template="carouselimage"`, and select your images directly with the `pages` parameter.
<p>
<div id="carousel-example-images" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
[[!inline pages="*.jpg" template="carouselimage" feeds="no"]]
</div>
<a class="left carousel-control" href="#carousel-example-images" role="button" data-slide="prev">
<span class="icon-prev" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-images" role="button" data-slide="next">
<span class="icon-next" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</p>
## Progress bars
Ikistrap also provides a progress directive which works in the same way as the progress plugin,
but it also allows an extra class to be specified to change the style per bar.
[[!progress totalpages="* and !*/Discussion" donepages="*/Discussion"]]
[[!progress percent="33%"]]
[[!progress percent="66%" class="progress-success progress-striped"]]
## Other stuff
Goes here.
# Calendar
This is an example of the ikiwiki calendar function.
Here is a monthly calendar:
[[!calendar type="month"]]
And this is a yearly calendar:
[[!calendar type="year"]]
# Comments
This is an example of a page where comments are allowed.
[[!comment format=mdwn
username="Anonymous Coward"
subject="Indeed"
date="2009-06-02T19:05:00Z"
content="""
Hi, I just want to say that I totally agree with you.
Have a nice day!
"""
]]
[[!comment format=mdwn
username="Pseudonymous Person"
subject="I am disagree"
date="2009-06-02T19:05:01Z"
content="""
I don't think so. Eggs should neither be capped at the top or at the bottom.
Symmetry is only attained by slicing it in half in a plane spanned by the line between the top and bottom.
"""
]]
# Inline pages
Here is an example of inline pages using the default inlining theme:
[[!inline pages="sample_text/* and !*/Discussion" reverse="yes" limit="3"]]
Here is an example of inlining with actions enabled:
[[!inline pages="sample_text/* and !*/Discussion" reverse="yes" skip="3" limit="2" actions="1"]]
content/Lemonshark.jpg

30.5 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment