Skip to content

Commit fd3ed40

Browse files
authored
Merge pull request #315 from presslabs/hugo62
Update documentaion structure and syntax
2 parents 9c788aa + 15b5386 commit fd3ed40

File tree

6 files changed

+66
-149
lines changed

6 files changed

+66
-149
lines changed

docs/_index.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,32 @@
22
title: What is Gitfs
33
linktitle: What is Gitfs
44
description: Gitfs is a fuse file system that fully integrates with git
5-
categories: [gitfs]
65
keywords: [gitfs, versioned filesystem, git filesystem, fuse, linux filesystem, macos filesystem]
7-
toc: false
8-
related: false
9-
layout: documentation-home
106
---
7+
8+
## Welcome to gitfs
9+
10+
gitfs is a [FUSE](http://fuse.sourceforge.net/) file system that fully integrates with git. You can mount a remote repository’s branch locally, and any subsequent changes made to the files will be automatically committed to the remote.
11+
12+
## What’s its purpose?
13+
14+
gitfs was designed to bring the full powers of git to everyone, irrespective of their experience using the tool. You can mount any repository, and all the changes you make will be automatically converted into commits. gitfs will also expose the history of the branch you’re currently working on by simulating snapshots of every commit.
15+
16+
gitfs is useful in places where you want to keep track of all your files, but at the same time you don’t have the possibility of organizing everything into commits yourself. A FUSE file system for git repositories, with local cache.
17+
18+
## Features
19+
20+
- Automatically commits changes: create, delete, update files and their metadata
21+
- Browse through working index and commit history
22+
- Merges with upstream by automatically accepting local changes
23+
- Mounts the file system as a user or a group
24+
- Caching commits reduces the memory footprint and speeds up navigation
25+
- Reduces the number of commits by grouping pushes
26+
27+
## Development
28+
29+
You are highly encouraged to use gitfs, to contribute with code, tests, documentation, or just to share your experience. Development of gitfs happens at [github.com/Presslabs/gitfs](https://github.com/Presslabs/gitfs). The concise contribution guide can be found in the [CONTRIBUTING.md](https://github.com/Presslabs/gitfs/blob/master/CONTRIBUTING.md) file.
30+
31+
## License
32+
33+
This project is licensed under the Apache 2.0 license. Have a look at the [LICENSE](https://github.com/Presslabs/gitfs/blob/master/LICENSE) file in the top distribution directory for the complete, unabridged reference.

docs/arguments.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22
title: Arguments
33
linktitle: Arguments
44
description: A list with all arguments for Gitfs
5-
categories: [gitfs]
65
keywords: [gitfs, arguments, usage]
7-
weight: 4
8-
draft: false
9-
aliases: []
10-
toc: true
11-
related: true
12-
slug: arguments
6+
menu:
7+
global:
8+
weight: 3
139
---
1410

1511
## Using options
@@ -20,7 +16,7 @@ In order to use options when mounting gitfs, you need to append the options as a
2016
-o option1=value1,option2=value2,option3=value3...
2117
```
2218

23-
### All available options
19+
## All available options
2420

2521
| **Name** | **Default** | **Description** |
2622
|----------------------|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

docs/config.toml

Lines changed: 15 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,29 @@
1-
baseURL = "https://www.presslabs.com/code/gitfs/"
2-
languageCode = "en-us"
3-
title = "Gitfs DOCS"
4-
summaryLength = 15
5-
metaDataFormat = "yaml"
6-
theme = "docs"
7-
enableRobotsTXT = true
8-
enableGitInfo = true
1+
baseURL = "https://www.presslabs.com/docs/code/gitfs"
92
pygmentsCodeFences = true
10-
pygmentsOptions = ""
3+
pygmentsCodeFencesGuessSyntax = true
114
pygmentsUseClasses = true
12-
pygmentsUseClassic = false
13-
pygmentsStyle = "github"
14-
dataDir = "/site/data"
5+
theme = "hugo-docs-theme"
6+
languageCode = "en-us"
7+
title = "Gitfs DOCS"
8+
9+
[markup]
10+
defaultMarkdownHandler = "goldmark"
1511

1612
[params]
17-
site_url = "https://www.presslabs.com/code/"
18-
legal_url = "https://www.presslabs.com/legal"
19-
breadcrumbs_root = "Gitfs DOCS"
20-
quick_start = true
21-
quick_start_link = "what-is-gitfs/"
13+
related = true
2214
logo_text = "CODE"
23-
search_placeholder = "Search code"
24-
footer_menu = true
25-
footer_menu_title = "DOCUMENTATION"
26-
title = "Welcome to Gitfs Documentation!"
27-
description = "Gitfs is a fuse filesystem that fully integrates with git"
28-
release = "0.5.1"
29-
# debug = true
30-
algolia_search = true
31-
algolia_appId = "0TS6NFHDBC"
32-
algolia_apiKey = "099bffdf3b4a6ea94ddbea10f73dd15a"
33-
algolia_indexName = "Gitfs Docs"
34-
algolia_currentLanguageOnly = true
35-
images = ["images/code.jpg"]
15+
versions = false
3616

3717
[params.algolia]
38-
vars = ["title", "description", "summary", "content", "date", "lastmod", "permalink", "text", "lvl0", "lvl1", "url"]
39-
params = ["categories", "keywords"]
40-
41-
[blackfriday]
42-
angledQuotes = true
43-
extensions = ["hardLineBreak"]
44-
sourceRelativeLinks = true
45-
fractions = false
46-
plainIDAnchors = true
47-
48-
[outputFormats.Algolia]
49-
baseName = "algolia"
50-
isPlainText = true
51-
mediaType = "application/json"
52-
notAlternative = true
18+
appId = "0TS6NFHDBC"
19+
apiKey = "b2efcfd6516eed7a2f19269f9cb13acb"
20+
indexName = "Gitfs Docs"
21+
vars = ["title", "description", "content", "date", "lastmod", "permalink", "text", "lvl0", "lvl1", "url"]
5322

5423
[outputs]
55-
home = [ "HTML", "RSS", "JSON", "Algolia" ]
56-
57-
[taxonomies]
58-
category = "categories"
24+
home = [ "HTML", "RSS", "JSON" ]
5925

6026
[related]
6127
threshold = 80
6228
includeNewer = true
6329
toLower = false
64-
65-
[[related.indices]]
66-
name = "keywords"
67-
weight = 150
68-
69-
[[menu.docs]]
70-
name = "What is Gitfs"
71-
weight = 1
72-
url = "/what-is-gitfs/"
73-
74-
[[menu.docs]]
75-
name = "How it works"
76-
weight = 2
77-
url = "/how-gitfs-works/"
78-
79-
[[menu.docs]]
80-
name = "Usage"
81-
weight = 3
82-
url = "/install-and-use-gitfs/"
83-
84-
[[menu.docs]]
85-
name = "Arguments"
86-
weight = 4
87-
url = "/arguments/"
88-
89-
[imaging]
90-
resampleFilter = "CatmullRom"
91-
quality = 75
92-
anchor = "smart"

docs/how-it-works.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,25 @@
22
title: How Gitfs works
33
linktitle: Gitfs explained
44
description: Gitfs uses fuse to create current and history directories
5-
categories: [gitfs]
65
keywords: [gitfs, readonlyview, passthroughview, currentview, historyview, commitview, indexview, fetchworker, mergeworker]
7-
weight: 2
8-
draft: false
9-
aliases: []
10-
toc: true
11-
related: true
12-
slug: how-gitfs-works
6+
menu:
7+
global:
8+
weight: 1
139
---
1410

1511
## FUSE
1612

1713
gitfs uses [FUSE](http://fuse.sourceforge.net/) to create its filesystem. It’s used to create the `current` and `history` directories that you can find where you mounted the repository. More on that [here](usage.md#user-content-directory-structure).
1814

19-
### pygit2
15+
## pygit2
2016

2117
[pygit2](https://github.com/libgit2/pygit2) gives us direct access to git and makes room for a lot of optimization. The alternative, using shell commands, would have been a pain to implement and so would have been tying it to a state too.
2218

23-
### Structure
24-
This is a simplified overview of the `gitfs` structure.
19+
## Structure
2520

26-
### Class diagram
21+
This is a simplified overview of the `gitfs` structure.
2722

23+
## Class diagram
2824

2925
### Router
3026

docs/usage.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
title: How to install and use Gitfs
33
linktitle: Install Gitfs
44
description: Here are the required steps to install and use Gitfs on your machine.
5-
categories: [gitfs]
65
keywords: [gitfs, install gitfs, install on ubuntu 18.04, install on ubuntu 19.04, gitfs on ubuntu, gitfs on debian, gitfs on macos]
7-
weight: 3
8-
draft: false
9-
aliases: []
10-
toc: true
11-
related: true
12-
slug: install-and-use-gitfs
6+
menu:
7+
global:
8+
weight: 2
9+
alias: install-and-use-gitfs
1310
---
1411

1512
## Installing
@@ -48,7 +45,8 @@ In order to mount your repository to the desired directory, use:
4845
```
4946
gitfs http://your.com/repository.git /mount/directory
5047
```
51-
#### Full github example
48+
### Full github example
49+
5250
Consider the following setup:
5351
- apache2 running as `www-data` user/group
5452
- `foo_user` - your username at github.com
@@ -61,13 +59,17 @@ Before mounting your repo, run once these two commands:
6159

6260
Now it's time for test run:
6361

64-
`gitfs -o log=/var/log/gitfs.log,debug=true,foreground=true,commiter_name=foo_user,commiter_email=foo_user@whatever.com,user=www-data,group=www-data,username=foo_user,password=boo_password https://github.com/foo_user/my_git_project.git /var/mount/whatever_dir`
62+
```
63+
gitfs -o log=/var/log/gitfs.log,debug=true,foreground=true,commiter_name=foo_user,commiter_email=foo_user@whatever.com,user=www-data,group=www-data,username=foo_user,password=boo_password https://github.com/foo_user/my_git_project.git /var/mount/whatever_dir
64+
```
6565

66-
Open second terminal window and monitor the log file via command `tail -f /var/log/gitfs.log`. Play around with files in your dir and see how it reflects in your repository at github, make sure that it works in both directions. Use Ctrl-C to stop gitfs when you are done.
66+
Open second terminal window and monitor the log file via command `tail -f /var/log/gitfs.log`. Play around with files in your dir and see how it reflects in your repository at github, make sure that it works in both directions. Use Ctrl-C to stop gitfs when you are done.
6767

6868
For production use the following arguments:
6969

70-
`gitfs -o log=/var/log/gitfs.log,debug=false,foreground=false,log_level=warning,commiter_name=foo_user,commiter_email=foo_user@whatever.com,user=www-data,group=www-data,username=foo_user,password=boo_password https://github.com/foo_user/my_git_project.git /var/mount/whatever_dir`
70+
```
71+
gitfs -o log=/var/log/gitfs.log,debug=false,foreground=false,log_level=warning,commiter_name=foo_user,commiter_email=foo_user@whatever.com,user=www-data,group=www-data,username=foo_user,password=boo_password https://github.com/foo_user/my_git_project.git /var/mount/whatever_dir
72+
```
7173

7274
See [Arguments](arguments.md) for more details.
7375

@@ -101,5 +103,4 @@ The inner folders are the snapshots of their respective commits.
101103

102104
`gitfs` automatically fetches the newest changes from your repository at a given time interval. The default delay between fetches is `30s` but you can change this value with the `fetch_delay` argument. See [Arguments](arguments.md) for more details.
103105

104-
105106
The inner folders are the snapshots of their respective commits.

docs/what-is-gitfs.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)