-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds an /example/ folder that contains a logseq graph and its export in the form of Hugo page
- Loading branch information
Showing
22 changed files
with
674 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Sample workflow for building and deploying a Hugo site to GitHub Pages | ||
name: Deploy Hugo example to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- main | ||
- example | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
# Default to bash | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
HUGO_VERSION: 0.116.1 | ||
steps: | ||
- name: Install Hugo CLI | ||
run: | | ||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | ||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | ||
- name: Install Dart Sass | ||
run: sudo snap install dart-sass | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
# fetch-depth: 0 | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
# - name: Install Node.js dependencies | ||
# run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" | ||
- name: Build with Hugo | ||
env: | ||
# For maximum backward compatibility with Hugo modules | ||
HUGO_ENVIRONMENT: production | ||
HUGO_ENV: production | ||
run: | | ||
cd example/logseq-export-example | ||
hugo mod get -u | ||
hugo \ | ||
--gc \ | ||
--minify \ | ||
--baseURL "${{ steps.pages.outputs.base_url }}/" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./example/logseq-export-example/public | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
logseq-export | ||
export-* | ||
test/test-output | ||
example/logseq-export-example/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
draft: true | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
languageCode: 'en-us' | ||
title: 'Logseq-Export example site' | ||
menu: | ||
main: | ||
- name: "<u>H</u>ome" | ||
url: / | ||
weight: 1 | ||
module: | ||
imports: | ||
- path: github.com/barklan/hugo-dead-simple | ||
# Even though this setting is deprecated, I have to put it in here because GitHub pages | ||
# prepend the project name (/logseq-export/) to the whole site and the relative links | ||
# in the graph Markdown files are pointing to /graph/page instead of /logseq-export/graph/page | ||
# this setting prepends the `baseURL` to each of the links | ||
canonifyURLs: true |
21 changes: 21 additions & 0 deletions
21
example/logseq-export-example/content/graph/2022-09-25-test-page.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
date: 2022-09-25 | ||
public: true | ||
slug: test-page | ||
title: "Test page" | ||
--- | ||
|
||
This is an example paragraph | ||
|
||
- Second level means bullet points | ||
- `logseq-export` also supports multi-level bullet points | ||
|
||
```ts | ||
const v = "Hello world" | ||
``` | ||
|
||
You can | ||
also | ||
have | ||
|
||
Multi-line strings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
public: true | ||
slug: _index | ||
title: "Index" | ||
--- | ||
|
||
## Welcome | ||
|
||
Welcome to this example page. | ||
|
||
This site is generated from a [Logseq](https://logseq.com/) graph using [logseq-export](https://github.com/viktomas/logseq-export) | ||
|
||
## See other pages | ||
|
||
Se how we can link to other pages [Most important page](/graph/most-important-page) | ||
|
||
Or see the [Test page](/graph/test-page) | ||
|
||
## Credit | ||
|
||
This example site uses [Hugo](https://gohugo.io/) with [barklan/hugo-dead-simple](https://github.com/barklan/hugo-dead-simple) theme. |
13 changes: 13 additions & 0 deletions
13
example/logseq-export-example/content/graph/most-important-page.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
public: true | ||
slug: most-important-page | ||
title: "Most important page" | ||
--- | ||
|
||
This page seems quite important | ||
|
||
Here is a picture of a cute shabby dog | ||
|
||
![dog-316598_1280.jpg](/assets/graph/dog-316598_1280_1690970151376_0.jpg) | ||
|
||
Continue to the [Test page](/graph/test-page) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module logseq-export-example | ||
|
||
go 1.19 | ||
|
||
require github.com/barklan/hugo-dead-simple v1.67.0 // indirect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/barklan/hugo-dead-simple v1.67.0 h1:pGpxybvfH550M2Sv/TwYKmPs6IhiolRVRS4spqJwUH4= | ||
github.com/barklan/hugo-dead-simple v1.67.0/go.mod h1:Ql5njM3SwZWMqWD1bt6UQoebKHIuRt37HeEkiWMUxXo= |
Binary file added
BIN
+163 KB
...e/logseq-export-example/static/assets/graph/dog-316598_1280_1690970151376_0.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
unquotedProperties: | ||
- date | ||
- slug | ||
- public | ||
- tags | ||
- shelves | ||
- audiobook | ||
- started | ||
assetsRelativePath: 'static/images/logseq' | ||
webAssetsPathPrefix: "/images/logseq" |
Oops, something went wrong.