[docs] Add simple script to build site locally
Also add more excludes for jekyll
This commit is contained in:
2
docs/.gitignore
vendored
2
docs/.gitignore
vendored
@ -3,3 +3,5 @@ _site/
|
||||
.jekyll-metadata
|
||||
_pdf
|
||||
.idea/
|
||||
vendor/
|
||||
.bundle/
|
||||
|
@ -1,5 +1,8 @@
|
||||
# PMD-New-Site
|
||||
New Site For PMD Core Open Source Project
|
||||
# PMD Documentation
|
||||
|
||||
The documentation is available at: <https://pmd.github.io/pmd/>
|
||||
|
||||
The documentation for the latest release is at: <https://pmd.github.io/latest/>
|
||||
|
||||
## Site Theme
|
||||
|
||||
@ -7,6 +10,14 @@ This site was built using the tomjohnson1492/documentation-theme-jekyll theme
|
||||
|
||||
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/
|
||||
|
||||
## Building using Script
|
||||
|
||||
bash build-docs.sh
|
||||
|
||||
This will run bundler to fetch and potentially update the ruby gems.
|
||||
And then it will execute jekyll and build a offline site.
|
||||
Open the file `_site/index.html` with your browser to see the site.
|
||||
|
||||
## Building using Bundler
|
||||
|
||||
bundle install # once
|
||||
@ -14,6 +25,9 @@ A Jekyll-based theme designed for documentation and help systems. See the link f
|
||||
|
||||
Go to: http://localhost:4005/
|
||||
|
||||
This variant is useful to get constant updates: When you modify a file, jekyll will automatically rebuild
|
||||
the site, so you just need to hit Refresh in the browser to see the update.
|
||||
|
||||
## Building using Docker
|
||||
|
||||
docker build --no-cache -t pmd-doc . # once
|
||||
|
@ -29,10 +29,16 @@ host: 127.0.0.1
|
||||
port: 4005
|
||||
# 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.
|
||||
|
||||
# these are the files and directories that jekyll will exclude from the build
|
||||
exclude:
|
||||
- .idea/
|
||||
- .gitignore
|
||||
# these are the files and directories that jekyll will exclude from the build
|
||||
- vendor/
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
- README.md
|
||||
- Dockerfile
|
||||
- build-docs.sh
|
||||
|
||||
feedback_subject_line: PMD Source Code Analyzer
|
||||
|
||||
|
3
docs/build-docs.sh
Normal file
3
docs/build-docs.sh
Normal file
@ -0,0 +1,3 @@
|
||||
bundle install --path vendor/bundle
|
||||
bundle update
|
||||
bundle exec jekyll build
|
@ -1,4 +0,0 @@
|
||||
git add .
|
||||
git status
|
||||
git commit -m "content update"
|
||||
git push
|
Reference in New Issue
Block a user