Skip to content

Commit 66df143

Browse files
committed
correct go module
1 parent 1d17119 commit 66df143

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+118
-118
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
XLog
22
=========
33

4-
[![Go Report Card](https://goreportcard.com/badge/github.com/emad-elsaid/xlog)](https://goreportcard.com/report/github.com/emad-elsaid/xlog) [![GoDoc](https://godoc.org/github.com/emad-elsaid/xlog?status.svg)](https://godoc.org/github.com/emad-elsaid/xlog)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/emad-elsaid/xlog/v2)](https://goreportcard.com/report/github.com/emad-elsaid/xlog/v2) [![GoDoc](https://godoc.org/github.com/emad-elsaid/xlog/v2?status.svg)](https://godoc.org/github.com/emad-elsaid/xlog/v2)
55

66

77

cmd/xlog/xlog.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
// Core
55
"context"
66

7-
"github.com/emad-elsaid/xlog"
7+
"github.com/emad-elsaid/xlog/v2"
88

99
// All official extensions
10-
_ "github.com/emad-elsaid/xlog/extensions/all"
10+
_ "github.com/emad-elsaid/xlog/v2/extensions/all"
1111
)
1212

1313
func main() {

docs/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Xlog is a Go package that has its public API documented and published on https://pkg.go.dev as all Go packages do. Latest documentation can be found here https://pkg.go.dev/github.com/emad-elsaid/xlog
1+
Xlog is a Go package that has its public API documented and published on https://pkg.go.dev as all Go packages do. Latest documentation can be found here https://pkg.go.dev/github.com/emad-elsaid/xlog/v2

docs/Custom installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ package main
2525

2626
import (
2727
// Core
28-
"github.com/emad-elsaid/xlog"
28+
"github.com/emad-elsaid/xlog/v2"
2929

3030
// All official extensions
31-
_ "github.com/emad-elsaid/xlog/extensions/all"
31+
_ "github.com/emad-elsaid/xlog/v2/extensions/all"
3232
)
3333

3434
func main() {
@@ -51,7 +51,7 @@ You can also import any extensions that you developed at this point.
5151
Now use Go to run your custom installation
5252

5353
```shell
54-
go get github.com/emad-elsaid/xlog
54+
go get github.com/emad-elsaid/xlog/v2
5555
go run xlog.go
5656
```
5757

docs/Generate static website.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ xlog --build /path/to/output
88

99
Xlog will build all markdown files to HTML and extract all static files from inside the binary executable file to that destination directory. Then it will terminate.
1010

11-
Building process creates a xlog server instance and request all pages and save it to desk. That allow xlog extensions to define a new handler that renders a page. the page will work in both usecases: local server, static site generation. extensions has to also register the path for build using [`RegisteBuildPage`](https://pkg.go.dev/github.com/emad-elsaid/xlog#RegisterBuildPage) function
11+
Building process creates a xlog server instance and request all pages and save it to desk. That allow xlog extensions to define a new handler that renders a page. the page will work in both usecases: local server, static site generation. extensions has to also register the path for build using [`RegisteBuildPage`](https://pkg.go.dev/github.com/emad-elsaid/xlog/v2#RegisterBuildPage) function
1212

1313
While building static site xlog turns on **READONLY** mode. so specifying `--build` flag is equal to `--build --readonly`.
1414

15-
Xlog builds `/docs` directory every commit to update this website. it uses Github workflow to do that. https://github.com/emad-elsaid/xlog/blob/master/.github/workflows/xlog.yml
15+
Xlog builds `/docs` directory every commit to update this website. it uses Github workflow to do that. https://github.com/emad-elsaid/xlog/v2/blob/master/.github/workflows/xlog.yml

docs/Go package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Xlog is distributed as Go package that has a CLI that uses the package and all `xlog/extensions`. documentation of the Go package API can be found on https://pkg.go.dev/github.com/emad-elsaid/xlog
1+
Xlog is distributed as Go package that has a CLI that uses the package and all `xlog/extensions`. documentation of the Go package API can be found on https://pkg.go.dev/github.com/emad-elsaid/xlog/v2

docs/Hello world extension.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ First create an empty directory and initialize a new go module in it
1818
mkdir helloworld
1919
cd helloworld
2020
go mod init github.com/emad-elsaid/helloworld
21-
go get github.com/emad-elsaid/xlog
21+
go get github.com/emad-elsaid/xlog/v2
2222
```
2323

2424
Replace the URL to your github account or any other URL where your extension will be hosted. as per Go modules convention.
@@ -40,7 +40,7 @@ package main
4040

4141
import (
4242
// Core
43-
"github.com/emad-elsaid/xlog"
43+
"github.com/emad-elsaid/xlog/v2"
4444

4545
// Extensions
4646
_ "github.com/emad-elsaid/helloworld"
@@ -101,7 +101,7 @@ Packages add features to Xlog by calling `Register*` functions in the `init` fun
101101

102102
For our extension we want to add "Hello world!" before the actual page content. this is exactly what the Preprocessor is for. a function that processes the page text before rendering it to HTML.
103103

104-
We will create a function that implement the [Preprocessor interface](https://pkg.go.dev/github.com/emad-elsaid/xlog#Preprocessor). `helloworld.go` should have the following content.
104+
We will create a function that implement the [Preprocessor interface](https://pkg.go.dev/github.com/emad-elsaid/xlog/v2#Preprocessor). `helloworld.go` should have the following content.
105105

106106
```go
107107
package helloworld
@@ -117,12 +117,12 @@ This is a function that takes the page content as string and return the content
117117

118118
Now we'll need to register this function as a preprocessor.
119119
1. We create a struct that imports `xlog.Extension`
120-
1. We'll do this by importing xlog core and use [`RegisterPreprocessor`](https://pkg.go.dev/github.com/emad-elsaid/xlog#RegisterPreprocessor) in the Extension `Init`.
120+
1. We'll do this by importing xlog core and use [`RegisterPreprocessor`](https://pkg.go.dev/github.com/emad-elsaid/xlog/v2#RegisterPreprocessor) in the Extension `Init`.
121121

122122
```go
123123
package helloworld
124124

125-
import "github.com/emad-elsaid/xlog"
125+
import "github.com/emad-elsaid/xlog/v2"
126126

127127
func init() {
128128
xlog.RegisterExtension(Helloworld{})

docs/helper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ A helper function is a function that is used in an html template. the output of
22

33
Helper functions are Go `html/template` concept it's not introduced by xlog. an example can be found in html/template [documentation](https://pkg.go.dev/html/template#example-Template-Helpers).
44

5-
Extensions can define their own helpers to be used by any template using [`RegisterHelper`](https://pkg.go.dev/github.com/emad-elsaid/xlog#RegisterHelper) function. Registering a new helper has to be in the extension `init` function to be find at the time of parsing the templates.
5+
Extensions can define their own helpers to be used by any template using [`RegisterHelper`](https://pkg.go.dev/github.com/emad-elsaid/xlog/v2#RegisterHelper) function. Registering a new helper has to be in the extension `init` function to be find at the time of parsing the templates.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Xlog also allows:
1717
# :runner: Quick Start
1818

1919
```shell
20-
go install github.com/emad-elsaid/xlog/cmd/xlog@latest
20+
go install github.com/emad-elsaid/xlog/v2/cmd/xlog@latest
2121
mkdir new-site
2222
cd new-site
2323
xlog

extensions/activitypub/activitypub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strconv"
1010
"time"
1111

12-
. "github.com/emad-elsaid/xlog"
12+
. "github.com/emad-elsaid/xlog/v2"
1313
)
1414

1515
var domain string

0 commit comments

Comments
 (0)