소스 검색

website: Restructure directory.

* Remove the _ prefix from directories.

* Move cmd/website -> website/cmd.
Qi Xiao 3 년 전
부모
커밋
88c1d1514f
36개의 변경된 파일8개의 추가작업 그리고 10개의 파일을 삭제
  1. 2 1
      website/.gitignore
  2. 5 8
      website/Makefile
  3. 0 0
      website/cmd/elvdoc/main.go
  4. 0 0
      website/cmd/elvdoc/main_test.go
  5. 0 0
      website/cmd/genblog/.gitignore
  6. 0 0
      website/cmd/genblog/blog.go
  7. 0 0
      website/cmd/genblog/feed_tmpl.go
  8. 0 0
      website/cmd/genblog/main.go
  9. 0 0
      website/cmd/genblog/render.go
  10. 0 0
      website/cmd/highlight/highlight.go
  11. 1 1
      website/cmd/macros/macros.go
  12. 0 0
      website/favicons/android-chrome-192x192.png
  13. 0 0
      website/favicons/android-chrome-256x256.png
  14. 0 0
      website/favicons/apple-touch-icon.png
  15. 0 0
      website/favicons/browserconfig.xml
  16. 0 0
      website/favicons/favicon-16x16.png
  17. 0 0
      website/favicons/favicon-32x32.png
  18. 0 0
      website/favicons/favicon.ico
  19. 0 0
      website/favicons/mstile-150x150.png
  20. 0 0
      website/favicons/safari-pinned-tab.svg
  21. 0 0
      website/favicons/site.webmanifest
  22. 0 0
      website/tools/md-to-html
  23. 0 0
      website/tools/pandoc-data/templates/toc-and-body.html
  24. 0 0
      website/ttyshot/README.md
  25. 0 0
      website/ttyshot/completion-mode.html
  26. 0 0
      website/ttyshot/control-structures.html
  27. 0 0
      website/ttyshot/fundamentals/history-1.html
  28. 0 0
      website/ttyshot/fundamentals/history-2.html
  29. 0 0
      website/ttyshot/histlist-mode.html
  30. 0 0
      website/ttyshot/history-mode.html
  31. 0 0
      website/ttyshot/lastcmd.html
  32. 0 0
      website/ttyshot/location-mode-filter.html
  33. 0 0
      website/ttyshot/location-mode.html
  34. 0 0
      website/ttyshot/navigation-mode.html
  35. 0 0
      website/ttyshot/pipelines.html
  36. 0 0
      website/ttyshot/unicode-prompts.html

+ 2 - 1
website/.gitignore

@@ -1,4 +1,5 @@
 /home.html
 /*/*.html
+!/ttyshot/*.html
+/tools/*.bin
 /_dst
-/_tools/*.bin

+ 5 - 8
website/Makefile

@@ -1,8 +1,8 @@
-TOOLS_DIR := ./_tools
+TOOLS_DIR := ./tools
 DST_DIR = ./_dst
 PUBLISH_DIR := ./_publish
 
-MDS := home.md $(wildcard [^_]*/*.md)
+MDS := home.md $(filter-out %/README.md,$(wildcard [^_]*/*.md))
 HTMLS := $(MDS:.md=.html)
 
 TOOLS := highlight macros elvdoc genblog
@@ -12,17 +12,14 @@ default: gen
 %.html: %.md $(TOOL_BINARIES) $(TOOLS_DIR)/md-to-html
 	$(TOOLS_DIR)/md-to-html $< $@
 
-%.bin: %.go
-	go build -o $@ ./$<
-
 # Generates the website into the dst directory.
 gen: tools $(HTMLS)
-	./_tools/genblog.bin . $(DST_DIR)
-	ln -sf `pwd`/_favicons/* $(DST_DIR)/
+	./$(TOOLS_DIR)/genblog.bin . $(DST_DIR)
+	ln -sf `pwd`/favicons/* $(DST_DIR)/
 
 tools:
 	for tool in $(TOOLS); do \
-		go build -o _tools/$$tool.bin ../cmd/website/$$tool; \
+		go build -o $(TOOLS_DIR)/$$tool.bin ./cmd/$$tool; \
 	done
 
 genblog:

+ 0 - 0
cmd/website/elvdoc/main.go → website/cmd/elvdoc/main.go


+ 0 - 0
cmd/website/elvdoc/main_test.go → website/cmd/elvdoc/main_test.go


+ 0 - 0
cmd/website/genblog/.gitignore → website/cmd/genblog/.gitignore


+ 0 - 0
cmd/website/genblog/blog.go → website/cmd/genblog/blog.go


+ 0 - 0
cmd/website/genblog/feed_tmpl.go → website/cmd/genblog/feed_tmpl.go


+ 0 - 0
cmd/website/genblog/main.go → website/cmd/genblog/main.go


+ 0 - 0
cmd/website/genblog/render.go → website/cmd/genblog/render.go


+ 0 - 0
cmd/website/highlight/highlight.go → website/cmd/highlight/highlight.go


+ 1 - 1
cmd/website/macros/macros.go → website/cmd/macros/macros.go

@@ -36,7 +36,7 @@ func expandTtyshot(line string) string {
 		return line
 	}
 	name := line[i+len(ttyshot):]
-	content, err := ioutil.ReadFile(path.Join("_ttyshot", name+".html"))
+	content, err := ioutil.ReadFile(path.Join("ttyshot", name+".html"))
 	if err != nil {
 		log.Fatal(err)
 	}

+ 0 - 0
website/_favicons/android-chrome-192x192.png → website/favicons/android-chrome-192x192.png


+ 0 - 0
website/_favicons/android-chrome-256x256.png → website/favicons/android-chrome-256x256.png


+ 0 - 0
website/_favicons/apple-touch-icon.png → website/favicons/apple-touch-icon.png


+ 0 - 0
website/_favicons/browserconfig.xml → website/favicons/browserconfig.xml


+ 0 - 0
website/_favicons/favicon-16x16.png → website/favicons/favicon-16x16.png


+ 0 - 0
website/_favicons/favicon-32x32.png → website/favicons/favicon-32x32.png


+ 0 - 0
website/_favicons/favicon.ico → website/favicons/favicon.ico


+ 0 - 0
website/_favicons/mstile-150x150.png → website/favicons/mstile-150x150.png


+ 0 - 0
website/_favicons/safari-pinned-tab.svg → website/favicons/safari-pinned-tab.svg


+ 0 - 0
website/_favicons/site.webmanifest → website/favicons/site.webmanifest


+ 0 - 0
website/_tools/md-to-html → website/tools/md-to-html


+ 0 - 0
website/_tools/pandoc-data/templates/toc-and-body.html → website/tools/pandoc-data/templates/toc-and-body.html


+ 0 - 0
website/_ttyshot/README.md → website/ttyshot/README.md


+ 0 - 0
website/_ttyshot/completion-mode.html → website/ttyshot/completion-mode.html


+ 0 - 0
website/_ttyshot/control-structures.html → website/ttyshot/control-structures.html


+ 0 - 0
website/_ttyshot/fundamentals/history-1.html → website/ttyshot/fundamentals/history-1.html


+ 0 - 0
website/_ttyshot/fundamentals/history-2.html → website/ttyshot/fundamentals/history-2.html


+ 0 - 0
website/_ttyshot/histlist-mode.html → website/ttyshot/histlist-mode.html


+ 0 - 0
website/_ttyshot/history-mode.html → website/ttyshot/history-mode.html


+ 0 - 0
website/_ttyshot/lastcmd.html → website/ttyshot/lastcmd.html


+ 0 - 0
website/_ttyshot/location-mode-filter.html → website/ttyshot/location-mode-filter.html


+ 0 - 0
website/_ttyshot/location-mode.html → website/ttyshot/location-mode.html


+ 0 - 0
website/_ttyshot/navigation-mode.html → website/ttyshot/navigation-mode.html


+ 0 - 0
website/_ttyshot/pipelines.html → website/ttyshot/pipelines.html


+ 0 - 0
website/_ttyshot/unicode-prompts.html → website/ttyshot/unicode-prompts.html