Skip to content

Commit

Permalink
huge hairball commit, sorry
Browse files Browse the repository at this point in the history
  • Loading branch information
yusefnapora committed Mar 7, 2019
1 parent a6e98e9 commit 35eeb0d
Show file tree
Hide file tree
Showing 88 changed files with 6,983 additions and 8,210 deletions.
48 changes: 6 additions & 42 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SHELL=/bin/bash
DOMAIN="ipfs.io"
DOMAIN="docs.filecoin.io"

IPFSLOCAL="http://localhost:8080/ipfs/"
IPFSGATEWAY="https://ipfs.io/ipfs/"
Expand All @@ -21,7 +21,7 @@ endif
HUGO_LOCAL=./bin/hugo
# Path to Hugo binary to use when building the site
HUGO_BINARY=$(HUGO_LOCAL)
HUGO_VERSION=0.45.1
HUGO_VERSION=0.54.0
PLATFORM:=$(shell uname)
ifeq ('$(PLATFORM)', 'Darwin')
PLATFORM=macOS
Expand All @@ -35,57 +35,21 @@ endif
HUGO_URL="https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_$(PLATFORM)-$(MACH).tar.gz"


node_modules:
$(PREPEND)$(NPM) install $(APPEND)

ipfs-theme:
$(PREPEND)[ -d build/assets/fonts ] || mkdir -p build/assets/fonts
$(PREPEND)cp ./node_modules/ipfs-css/fonts/Montserrat* ./build/assets/fonts/ $(APPEND)
$(PREPEND)cp ./node_modules/ipfs-css/fonts/Inter-UI* ./build/assets/fonts/ $(APPEND)
$(PREPEND)node scripts/ipfs-css-constants.js $(APPEND)

packages:
# The JS packages don't actually generate useful docs right now, so skip them
# $(PREPEND)scripts/pkg2md.sh github.com/ipfs/js-ipfs-api master $(PKGDIR) pkg
# $(PREPEND)scripts/pkg2md.sh github.com/ipfs/js-ipfs master $(PKGDIR) pkg
#$(PREPEND)scripts/pkg2md.sh github.com/ipfs/go-ipfs-api v1.2.1 $(PKGDIR) go/pkg
#$(PREPEND)scripts/pkg2md.sh github.com/ipfs/go-ipfs/core/coreapi v0.4.15 $(PKGDIR) go/pkg
#$(PREPEND)scripts/pkg2md.sh github.com/ipfs/go-ipfs/core/coreapi/interface v0.4.15 $(PKGDIR) go/pkg
#$(PREPEND)scripts/pkg2md.sh github.com/ipfs/go-ipfs/core/coreapi/interface/options v0.4.15 $(PKGDIR) go/pkg

bin/hugo:
@echo "Installing Hugo to $(HUGO_LOCAL)..."
$(PREPEND)mkdir -p tmp_hugo $(APPEND)
$(PREPEND)curl --location "$(HUGO_URL)" | tar -xzf - -C tmp_hugo && chmod +x tmp_hugo/hugo && mv tmp_hugo/hugo $(HUGO_LOCAL) $(APPEND)
$(PREPEND)rm -rf tmp_hugo $(APPEND)

resources: ipfs-theme packages

install: bin/hugo node_modules resources

css:
# Dual calls to less because there seems to be a bug with multiple plugins in v3 :(
# https://github.com/less/less.js/issues/3187
$(PREPEND)$(NPMBIN)/lessc -clean-css --autoprefix src/styles/main.less build/assets/main.css $(APPEND)

js:
$(PREPEND)$(NPMBIN)/browserify src/js/main.js -o build/assets/main.js --debug $(APPEND)

minify-js: js
$(PREPEND)$(NPMBIN)/uglifyjs --compress --output build/assets/main.js -- build/assets/main.js $(APPEND)

lint:
$(NPMBIN)/standard src/js/**/*.js
install: bin/hugo

build: clean install lint css js minify-js
build: clean install
$(PREPEND)$(HUGO_BINARY) && \
echo "" && \
echo "Site built out to ./$(OUTPUTDIR)"

dev: css
dev: bin/hugo
$(PREPEND)( \
$(NPMBIN)/nodemon --watch src/styles --ext less,css --exec "$(NPMBIN)/lessc -clean-css --autoprefix src/styles/main.less build/assets/main.css" & \
$(NPMBIN)/watchify src/js/main.js -o build/assets/main.js --debug & \
$(HUGO_BINARY) server -w --port $(PORT) --bind 0.0.0.0 \
)

Expand All @@ -108,4 +72,4 @@ clean:
$(PREPEND)[ ! -d $(PKGDIR) ] || rm -rf $(PKGDIR)/*/
$(PREPEND)[ ! -d build/assets ] || rm -rf build/assets/*

.PHONY: packages build help deploy publish-to-domain clean
.PHONY: build help deploy publish-to-domain clean
6 changes: 6 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

Empty file removed bin/.gitkeep
Empty file.
4 changes: 0 additions & 4 deletions ci/Jenkinsfile

This file was deleted.

189 changes: 10 additions & 179 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,191 +1,22 @@
baseURL = "https://docs.libp2p.io"
relativeURLs = true
languageCode = "en"
DefaultContentLanguage = "en"
enableRobotsTXT=true

baseURL = ""
languageCode = "en-us"
title = "libp2p Documentation"

staticDir = ["static", "build"]

[blackfriday]
hrefTargetBlank = true
theme = "hugo-theme-learn"

[params]
editURL = "https://github.com/libp2p/docs/tree/master/content/"
ordersectionsby = "weight" # ordersectionsby = "title"
themeVariant = "libp2p"
disableInlineCopyToClipBoard = true

[outputs]
home = [ "HTML", "RSS", "JSON"]

[menu]

[[menu.main]]
identifier = "introduction"
name = "Introduction"
[[menu.shortcuts]]
name = "<i class='fas fa-home'></i> libp2p.io"
url = "https://libp2p.io"
weight = 1

[[menu.main]]
identifier = "guides"
name = "Guides"
weight = 2

[[menu.main]]
identifier = "reference"
name = "Reference"
weight = 3

[[menu.main]]
identifier = "community"
name = "Community"
weight = 4


[[menu.reference]]
identifier = "go_implementation"
name = "Go Implementation"
weight = 5


[[menu.reference]]
identifier = "js_implementation"
name = "JS Implementation"
weight = 5

[[menu.reference]]
identifier = "specs"
name = "Specifications & Planning"
weight = 6
[[menu.reference]]
parent = "specs"
name = "libp2p Specifications"
url = "https://github.com/libp2p/specs"
weight = 20

[[menu.guides]]
identifier = "guides"
name = "Guides"
weight = 3
[[menu.guides]]
identifier = "examples"
name = "Examples"
weight = 4


[[menu.community]]
identifier = "community"
name = "Community"
weight = 9
[[menu.community]]
parent = "community"
name = "Discussion/Support Forum"
url = "https://discuss.ipfs.io/tags/libp2p"
weight = 10
[[menu.community]]
parent = "community"
name = "IRC"
url = "/community/irc/"
weight = 20
# [[menu.community]]
# parent = "community"
# name = "Research Discussion"
# url = "https://github.com/ipfs/notes"
# weight = 30
# [[menu.community]]
# parent = "community"
# name = "Events Calendar"
# url = "https://calendar.google.com/calendar/embed?src=ipfs.io_eal36ugu5e75s207gfjcu0ae84@group.calendar.google.com"
# weight = 40
# [[menu.community]]
# parent = "community"
# name = "Community Tools"
# url = "https://github.com/ipfs/community/"
# weight = 50
# [[menu.community]]
# parent = "community"
# name = "Project Management"
# url = "https://github.com/ipfs/pm/"
# weight = 60
# [[menu.community]]
# parent = "community"
# name = "Blog"
# url = "https://ipfs.io/blog/"
# weight = 70
# [[menu.community]]
# parent = "community"
# name = "Youtube"
# url = "https://www.youtube.com/channel/UCdjsUXJ3QawK4O5L1kqqsew"
# weight = 80
# [[menu.community]]
# parent = "community"
# name = "Twitter (@IPFSbot)"
# url = "https://twitter.com/IPFSbot"
# weight = 90
# [[menu.community]]
# parent = "community"
# name = "Awesome IPFS"
# url = "https://awesome.ipfs.io/"
# [[menu.community]]
# parent = "community"
# name = "Public Archives on IPFS"
# title = "A community project to host archives of valuable public data."
# url = "https://archives.ipfs.io"
# [[menu.community]]
# parent="community"
# name = "FAQ"
# url = "https://discuss.ipfs.io/c/help/Old-FAQ"

[[menu.community]]
identifier = "applications"
name = "Applications"
weight = 8


[[menu.community]]
identifier = "contribute"
name = "Get Involved"
weight = 10
[[menu.community]]
parent = "contribute"
name = "GitHub"
[[menu.shortcuts]]
name = "<i class='fab fa-github'></i> libp2p Github"
url = "https://github.com/libp2p/libp2p"
weight = 5
[[menu.community]]
parent = "contribute"
name = "Contribution Guidelines"
url = "https://github.com/libp2p/community/blob/master/CONTRIBUTE.md"
weight = 10
[[menu.community]]
parent = "contribute"
name = "Code of Conduct"
url = "https://github.com/ipfs/community/blob/master/code-of-conduct.md"
weight = 30
[[menu.community]]
parent = "contribute"
name = "Go Style Guide"
url = "https://github.com/ipfs/community/blob/master/CONTRIBUTING_GO.md"
weight = 40
[[menu.community]]
parent = "contribute"
name = "JS Style Guide"
url = "https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md"
weight = 50

[[menu.community]]
identifier = "related"
name = "Related Projects"
[[menu.community]]
parent = "related"
name = "IPFS"
url = "https://ipfs.io"
weight = 1
[[menu.community]]
parent = "related"
name = "Multiformats"
url = "https://multiformats.io"
weight = 2
[[menu.community]]
parent = "related"
name = "IPLD"
url = "https://ipld.io"
weight = 3
57 changes: 0 additions & 57 deletions content/_index.md

This file was deleted.

5 changes: 0 additions & 5 deletions content/community/_index.md

This file was deleted.

5 changes: 0 additions & 5 deletions content/community/applications/_index.md

This file was deleted.

12 changes: 0 additions & 12 deletions content/community/applications/built_with_libp2p.md

This file was deleted.

5 changes: 0 additions & 5 deletions content/community/contribute/_index.md

This file was deleted.

Loading

0 comments on commit 35eeb0d

Please sign in to comment.