Skip to content

Commit 04ba93b

Browse files
committed
[docs] Add simple script to build site locally
Also add more excludes for jekyll
1 parent 50b2368 commit 04ba93b

File tree

5 files changed

+28
-7
lines changed

5 files changed

+28
-7
lines changed

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ _site/
33
.jekyll-metadata
44
_pdf
55
.idea/
6+
vendor/
7+
.bundle/

docs/README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
# PMD-New-Site
2-
New Site For PMD Core Open Source Project
1+
# PMD Documentation
2+
3+
The documentation is available at: <https://pmd.github.io/pmd/>
4+
5+
The documentation for the latest release is at: <https://pmd.github.io/latest/>
36

47
## Site Theme
58

69
This site was built using the tomjohnson1492/documentation-theme-jekyll theme
710

811
A Jekyll-based theme designed for documentation and help systems. See the link for detailed instructions on setting up and configuring everything. http://idratherbewriting.com/documentation-theme-jekyll/
912

13+
## Building using Script
14+
15+
bash build-docs.sh
16+
17+
This will run bundler to fetch and potentially update the ruby gems.
18+
And then it will execute jekyll and build a offline site.
19+
Open the file `_site/index.html` with your browser to see the site.
20+
1021
## Building using Bundler
1122

1223
bundle install # once
1324
bundle exec jekyll serve
1425

1526
Go to: http://localhost:4005/
1627

28+
This variant is useful to get constant updates: When you modify a file, jekyll will automatically rebuild
29+
the site, so you just need to hit Refresh in the browser to see the update.
30+
1731
## Building using Docker
1832

1933
docker build --no-cache -t pmd-doc . # once

docs/_config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@ host: 127.0.0.1
2929
port: 4005
3030
# the port where the preview is rendered. You can leave this as is unless you have other Jekyll builds using this same port that might cause conflicts. in that case, use another port such as 4006.
3131

32+
# these are the files and directories that jekyll will exclude from the build
3233
exclude:
3334
- .idea/
3435
- .gitignore
35-
# these are the files and directories that jekyll will exclude from the build
36+
- vendor/
37+
- Gemfile
38+
- Gemfile.lock
39+
- README.md
40+
- Dockerfile
41+
- build-docs.sh
3642

3743
feedback_subject_line: PMD Source Code Analyzer
3844

docs/build-docs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bundle install --path vendor/bundle
2+
bundle update
3+
bundle exec jekyll build

docs/update.sh

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

0 commit comments

Comments
 (0)