Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up Hexo for documentation #12

Closed
wants to merge 8 commits into from

Conversation

muskankhedia
Copy link

Solves: #1

The parts covered in this PR:

  • Setting up Hexo as a dependency and added an npm script to generate docs
  • setting up a reasonable _config.yml to deploy the docs
  • setting up Travis to build and host docs via gh-pages

The working is explained in the gif below:
ezgif com-video-to-gif (1)

Note: For a check, the docs have been hosted in my account using the gh-pages branch. Pls, do update the $GITHUB_TOKEN for the proper and easy deployment of the docs in the organization GitHub link.

@muskankhedia
Copy link
Author

@abhishek97 @championswimmer Pls have a view and suggest if any changes required.

@abhishek97
Copy link
Contributor

how do i build the docs locally?,
./node_modules/.bin/hexo generate inside docs/ dir generate blank pages inside docs/public

@muskankhedia
Copy link
Author

In order to generate the public folder and host it, create a branch named gh-pages in the repository with all the files and hexo installed,
then run the command hexo clean && hexo deploy . It will automatically host the github page with the docs in the link https://org-name.github.io/express-jsonapi-controller/. And then make any further changes in the master folder and deploy it, it will change in the gh-pages site.

@abhishek97
Copy link
Contributor

@muskankhedia there should be a way to build docs locally as well.

@muskankhedia
Copy link
Author

@abhishek97 yes you can view the docs locally in the by executing the command hexo server in that particular branch itself. It will be hosted in the local server http://localhost:4000/

@muskankhedia
Copy link
Author

As now once the complete doc has been set up, anyone can easily deploy the changes and add more files in the future. This will make the work a lot easier in the future.

@muskankhedia
Copy link
Author

@abhishek97 Pls have a look in the PR.

@abhishek97
Copy link
Contributor

abhishek97 commented Jun 8, 2019

@muskankhedia I get empty response after running hexo server
Hit me up of Gitter, let's discuss this

@muskankhedia
Copy link
Author

@muskankhedia I get empty response after running hexo server
Hit me up of Gitter, let's discuss this

Yaa sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants