Code Monkey home page Code Monkey logo

hexo-theme-doc's People

Contributors

bhaskarmelkani avatar rbarilani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexo-theme-doc's Issues

The navigator closes unexpectedly

Expected Behavior

The navigator should expand when I click to a children of children .html page. For example, when I click to "Problem 2-1", the navigator should highlight "Problem 2-1" to orange, and keeps expanding the content in the navigator.

expand

Actual Behavior

The navigator closes when I click to a children of children .html page.
After clicking "Problem 2-1", the navigator will close, which is not so convenient.
close

Steps to Reproduce the Problem

The codes:

- text: 2 Getting Started
  type: link
  path: Chap02/2.0.html
  children:
  - text: 2.1 Insertion sort
    type: link
    path: Chap02/2.1.html
  - text: 2.2 Analyzing algorithms
    type: link
    path: Chap02/2.2.html
  - text: 2.3 Designing algorithms
    type: link
    path: Chap02/2.3.html
  - text: Chap 2. Problems
    type: link
    path: Chap02/2-0.html
    children:
    - text: Problem 2-1
      type: link
      path: Chap02/2-1.html
    - text: Problem 2-2
      type: link
      path: Chap02/2-2.html
    - text: Problem 2-3
      type: link
      path: Chap02/2-3.html
    - text: Problem 2-4
      type: link
      path: Chap02/2-4.html

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: macOS High Sierra version 10.13.3
  • Hexo Version: 3.5.0

Btw, is it possible to change the default color orange to other colors(like lightblue or green)?
I've modified the directory you mentioned in the documentation Hexo Doc Theme | SASS styles, but it seems it's not so easy to change this?

Thanks a lot!

Print able page

Please add support for print able page that hide the navigation.

Best regards,

Sarin Na Wangkanai

image

hexo-renderer-sass using error

https://zalando-incubator.github.io/hexo-theme-doc/usage-and-configuration/sass-styles.html
like the link, I created source/styles/doc.scss in the project root directory
and wrote down only this codes;
$doc-color-primary: red; // set primary color to "red"
@import "../node_modules/hexo-theme-doc/_doc.scss"
and it causes the error when I "hexo g"
it says
"Error: File to import not found or unreadable: ../node_modules/hexo-theme-doc/_doc.scss.
Parent style sheet: /Users/boyeon/study/blog/dokinchan/source/styles/doc.scss"

What should I do??

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: mac
  • Hexo Version: 3.4.4

Swagger Required objects

Would like some clarification on required objects for valid swagger 2.0 spec. Based on swagger-object section version 2.0 spec which can be found here --> https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swagger-object

securityDefinitions and security (and others too) are not required object for a specification file to be valid .

However when if I do not include the objects in my spec I get error messages similar to

" Data does not match any schemas from 'oneOf'........." `

Granted this may be version 3.0 (although I doubt there is a difference) When I test here: https://editor.swagger.io/ and remove the security definition object as well as all references to it it is recognized as valid.

feat(remote-swagger): provide a way to fetch secured swagger file

Currently it is not possible to fetch swagger file if it located under secured url e.g private github repository, enterprise github or just secured url.

As a solution I suggest to provide a way to define token to access urls. It can be defined via _config.yaml.

E.g

authorization:
  auth_key_1: token1
  auth_key_2: token2

usage:

{% swagger_ui https://github.com/someprivate/swagger.yaml auth_key_1 %}

The columns in the table are too close to one another

Expected Behavior

I hope that the columns in the markdown table won't be so close to one another(There should be some space between each column.)
goodtable

Actual Behavior

The columns in the table are too close to one another.

table

Steps to Reproduce the Problem

The codes:

| $A$ | $B$ | $O$ | $o$ | $\Omega$ | $\omega$ | $\Theta$ |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $\lg^k n$ | $n^\epsilon$ | yes | yes | no | no | no |
| $n^k$ | $c^n$ | yes | yes | no | no | no |
| $\sqrt{n}$ | $n^{\sin n}$ | no | no | no | no | no |
| $2^n$ | $2^{n/2}$ | no | no | yes | yes | no |
| $n^{\lg c}$ | $c^{\lg n}$ | yes | no | yes | no | yes |
| $\lg(n!)$ | $\lg(n^n)$ | yes | no | yes | no | yes |

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: macOS High Sierra version 10.13.3
  • Hexo Version: 3.5.0

Is it possible to adjust this? Thanks a lot.

Breadcrumb

Please breadcrumb feature to the documentation theme.

Best regards,

Sarin Na Wangkanai

installing hexo-theme-doc results in blank page with no layout: index.html error

Expected Behavior

http://localhost:4000/ brings up basic template of hexo-theme-doc

Actual Behavior

blank page with error message WARN No layout: index.html
default landscape theme works fine

Steps to Reproduce the Problem

  1. hexo init test
  2. npm install hexo-theme-doc --save
  3. modify _config.yml, change theme theme: ../node_modules/hexo-theme-doc
  4. hexo s

Specifications

  • NodeJS Version: 8.11.4
  • NPM Version: 5.6.0
  • OS: Windows 10
  • Hexo Version: 3.7.1

Search missing from deployed site

The search bar is missing from the site after being deployed.

it shows up fine with hexo server

I can see in the log that no such lunr.json is copied with hexo deploy

image

image

image

image

Site title not visible in nav-header

Expected Behavior

screenshot from 2018-02-07 18-58-05
Navigation menu with site title in its header

Actual Behavior

screenshot from 2018-02-07 18-58-52
Navigation menu doesn't have a site title. You can see the live version here: http://tabel.fractaltech.in/

Steps to Reproduce the Problem

Not sure. Maybe there is a config property that I have not set properly which you can point me to.

Specifications

  • NodeJS Version:8.9.4
  • NPM Version: 5.6.0
  • OS: Ubuntu 17.10
  • Hexo Version: 1.0.4

Looking for custom SCSS clarification

Expected Behavior

Adding custom SCSS is straightforward.

Actual Behavior

This doc is unclear about how this should be done.

For example, where is this file supposed to be located? Does it need to be in the theme dir or the project dir? Both have the same filenames.

Also, does this /styles/ dir supposed to have an s at the end?
source/styles/doc.scss

This line just appears to be wrong:
@import "../node_modules/hexo-theme-doc/_doc.scss"
and should be
@import "../../node_modules/hexo-theme-doc/_doc.scss"

To make custom style do you have to install the theme with git?

Does anyone have an example project I can look at? Thank you.

Cannot render swagger spec file

Hi

I am using hexo-theme-doc with hexo-theme-doc-seed. I keep

Expected Behavior

Render this swagger specification file:
https://zalando-incubator.github.io/hexo-theme-doc/f20a00536303efe9f480416cc6f09e32/petstore.yaml

to get this page
https://zalando-incubator.github.io/hexo-theme-doc/usage-and-configuration/swagger/swagger-ui.html#/pets/findPets

Actual Behavior

Getting error in attached image. Cannot seem to resolve relative references such as
$ref: '#/parameters/Authorization
selection_977

Markdown file contains only reference to spec file

{% swagger_ui ./spec/petstore.yaml %}

Steps to Reproduce the Problem

  1. Save spec file located here: https://zalando-incubator.github.io/hexo-theme-doc/f20a00536303efe9f480416cc6f09e32/petstore.yaml
  2. create a markdown file with swagger tags and reference to downloaded file - for example {% swagger_ui ./spec/petstore.yaml %}
  3. Check to see if page is rendered

Specifications

  • NodeJS Version: v8.9.0
  • NPM Version: 5.5.1
  • OS: DISTRIB_ID=LinuxMint DISTRIB_RELEASE=17.1
  • Hexo Version: 3.4.3

Also have the latest version of hexo-theme-docs which refers to npm version of hexo-doc rather than git repo

Hexo version output:

  • hexo: 3.4.3
  • hexo-cli: 1.0.4
  • os: Linux 3.13.0-37-generic linux x64
  • http_parser: 2.7.0
  • node: 8.9.0
  • v8: 6.1.534.46
  • uv: 1.15.0
  • zlib: 1.2.11
  • ares: 1.10.1-DEV
  • modules: 57
  • nghttp2: 1.25.0
  • openssl: 1.0.2l
  • icu: 59.1
  • unicode: 9.0
  • cldr: 31.0.1
  • tz: 2017b

feat(swagger-ui): use version 3

Use version 3 of swagger-ui

see git branch

Update 26/10/2017

Today I tried to include swagger-ui version 3 with a naif/raw implementation meant to discover:

  • what we can do with v3
  • how we can eventually customize it
  • and .... make it work.

In the process, I removed some code that was not required anymore since the implementation changed. Now the swagger specification is loaded client side where as before was embedded directly as javascript object.
The removed code was mostly about re-rendering the code snippet to embed a new version of the specification when there is a change, now loading and rendering are done client side, so the re-render of the "server-side" code snippet will be irrelevant (it will re-render the same code snippet).
The downside is that I have to include third party libraries also when the swagger_ui tag is not actually used, but I believe that a less connected solution should be possible with the help of hexo's 'hooks', if not, the code will be restored (something like this is also an option).

Some of my findings:

Pros

  • We can use directly the official swagger-ui version instead of the actual angular-boostrap version and including it directly from public cdns
  • swagger-ui styles are already namespaced by being applied just to children of '.swagger-ui' css class, so no more problem about including our custom swagger-ui.css made to avoid conflicts (we can just use the css cdn version), that means also smaller LICENSE to embed
  • UI looks overall nicer
  • Deep linking working quiet nicely (@zmeda this update should solve your issue )
  • Plugins System (I wrote a minimal plugin into a redux action)

Cons

  • With this raw implementation, the performance and reactivity of the page seems to suffer, it seems heavier than v2 angular-bootstrap version, might be misconfiguration. The time to fetch the specification should be also taken into account.

  • Authorize / Dialog UI has to be adjusted heavily to work nicely inside the theme context, as v2

allow alternative CDNs for fonts and js

First, great project.
The problem is with layout/layout.ejs, hardcoded assets like jquery, etc.
Note that these URLs might not be the best choice in some cases/regions.
Please allow overriding those in the configuration.

fonts.googleapis.com
code.jquery.com
cdnjs.cloudflare.com
fonts.gstatic.com

Thanks.

No menu item on sidebar (other than the title)

Expected Behavior

Sidebar item showing up.

Actual Behavior

Nothing. Just the title, i've tried the quick (seed) and long start (npm), same result.

Steps to Reproduce the Problem

  1. Just copy the navigation from the docs.

Specifications

  • NodeJS Version: 8.11.2
  • NPM Version: 5.6.0
  • OS: Windows 10
  • Hexo Version: 3.7.1

Thanks for helping!

How to show specific line numbers of the code block manually?

Expected Behavior

I want to specify the line numbers by myself. I'm currently work on a solution of a book. Since I want to correspond to the book's style, I hope I can start the line number "1" from the second line, not the first line.

In the hexo-theme-doc, It'll show something like this(regardless the syntax.)

  1  func(a, b)     
  2      A()        
  3      return B      

I hope something like this:

     func(a, b)     
  1      A()        
  2      return B   

Or sometimes I want it show a specific line number like:

  8  func()

Is it possible to change this? Thanks a lot!!

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: macOS High Sierra version 10.13.3
  • Hexo Version: 3.5.0

Navigator in the left refreshes every time I clicked to a new link.

Expected Behavior

I hope that the navigator in the left won't refresh every time I clicked to a new link.

Actual Behavior

If I clicked the relatively bottom link in the left, the navigator will refresh(i.e., the whole page will link to a new .html page), which is not convenient since I have to scroll down the navigator in the left again.

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: macOS High Sierra version 10.13.3
  • Hexo Version: 3.5.0

Thanks a lot!

Hosting HTML documentation?

I'd like to first say that this seems like a fantastic tool for hosting documentation! Kudos on the good work.

It may be possible but seemingly undocumented, but is there a way to host or serve HTML generated by documentation engines like javadocs or sphinx? It would be a shame to need to convert them to Markdown and host them as separate pages.

chore: travis CI job failing

Expected Behavior

Travis CI Job runs selenium tests.

Actual Behavior

Travis CI job fails claiming that Selenium server is not running.

Steps to Reproduce the Problem

  1. Open a PR and check the triggered travis Job logs.

The code block doesn't show properly on the smartphone.

Expected Behavior

The code block is properly(i.e., rectangular) displayed in the browser on a smartphone.

Actual Behavior

The corner of the code block is not displayed correctly in the browser on a smartphone. There are rectangular hollows in the corner.
codeblock

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: iOS 11.2.1
  • Hexo Version: 3.5.0

feat(layout): provide a way to load extra stylesheets and scripts

Provide a way to load extra stylesheets and scripts

Proposal:

_config.yml

theme_config:
   layout_blocks:
      head: 
          - stylesheet:my-custom.css
          - javascript:my-custom.js
     footer:
          - javascript:my-custom-2.js

Proposal 2:

Just give the possibility to add "partials" directly?

theme_config:
   layout:
      head_start: partials/mobile-favicon.ejs # ./source/partials/mobile-favicon.ejs
      head_end: partials/include-custom-styles.ejs
      footer:
          - partials/include-custom-javascript.ejs
          - partials/copyright.ejs

Specification Download link

Expected Behavior

Specification download link and title when swagger_ui version set to 3
SHould be able to click link and download swagger specification

Actual Behavior

Blank link with no title. Cannot download specification

Steps to Reproduce the Problem

1.Visit the link at your demo site and give it a try. Same behavior on localhost https://zalando-incubator.github.io/hexo-theme-doc/usage-and-configuration/swagger/swagger-ui.html#/Demo-v3
2. Compare to https://zalando-incubator.github.io/hexo-theme-doc/usage-and-configuration/swagger/swagger-ui.html#/Demo-v2
3.

Specifications

  • NodeJS Version: v8.9.0
  • NPM Version: 5.5.1
  • OS: DISTRIB_ID=LinuxMint DISTRIB_RELEASE=17.1
  • Hexo Version: 3.4.3

Also have the latest version of hexo-theme-docs which refers to npm version of hexo-doc rather than git repo

Hexo version output:

  • hexo: 3.4.3
  • hexo-cli: 1.0.4
  • os: Linux 3.13.0-37-generic linux x64
  • http_parser: 2.7.0
  • node: 8.9.0
  • v8: 6.1.534.46
  • uv: 1.15.0
  • zlib: 1.2.11
  • ares: 1.10.1-DEV
  • modules: 57
  • nghttp2: 1.25.0
  • openssl: 1.0.2l
  • icu: 59.1
  • unicode: 9.0
  • cldr: 31.0.1
  • tz: 2017b

More convienent way of making Hexo use the theme from node_modules?

So, I was wondering, why do we have to make a symlink to install the theme? It's in order to get Hexo to use the theme from node_modules, right? So that the theme can be updated with npm, yarn or whatever

Well, wouldn't the same thing be achieved by setting the theme option to that folder directly?

Like this:

theme: ../node_modules/hexo-theme-doc

Because I did test it and it seems to be working, so I was wondering if you did consider this, maybe there are some "side effects" but as far as I can tell, it seems to be working, so I thought I would ask about it

Array of Object Display

Expected Behavior

Array of objects should display array square bracket with definition object inside it. Like they have in editor.swagger.io example spec
image

Actual Behavior

You get the array square brackets with the object curly braces inside but the object definition is missing (fields and field names)
image

Steps to Reproduce the Problem

Code

holidaySchema:
    type: object
    description: Holiday Schema
    properties:
      id:
        description: Id 
        type: string
        example: ObjectId("5a32b859b2cf2329ac90f763")
 visit_locations:
        description: Array of visited Location Objects 
        type: array                                                                                                                                                                                   
        items:
          - $ref: '#/definitions/visitedLocationsSchema' 
 
visitedLocationsSchema:
    type: object
    description: Visited Location Object
    properties:
      resorts:
        description: Object ID ref of visited resorts
        type: string
        format: ObjectId
        example: 5a70446cf40eca5991ce31c8
      location:
        description: ObjectID ref to location address of resort 
        type: string
        format: ObjectId
        example: 5a70446cf40eca5991ce31c8

Specifications

NodeJS Version: v8.9.4
NPM Version: 5.5.1
OS: DISTRIB_ID=LinuxMint DISTRIB_RELEASE=17.1
Hexo Version: 3.4.3
Hexo-theme-doc: 0.1.1
Hexo version output:

hexo: 3.4.3
hexo-cli: 1.0.4
os: Linux 3.13.0-37-generic linux x64
http_parser: 2.7.0
node: 8.9.0
v8: 6.1.534.46
uv: 1.15.0
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.25.0
openssl: 1.0.2l
icu: 59.1
unicode: 9.0
cldr: 31.0.1
tz: 2017b

How to control search behavior?

Expected Behavior

I am using this theme to create a documentation website for my ORM, tabel.

I am not sure what to do with the search input from the left-menu(shown in the image below)
screenshot from 2018-02-01 20-35-07

I would be happy if I could somehow remove it, or start making it show search results which are relevant to my ORM's documentation. I am not sure how to do that.

Actual Behavior

I can neither find the steps I need to take to remove the search bar, nor am I able to figure out how to make the search-input fetch results from the content that I am writing. Right now, its showing results from god knows where. (Screenshot attached)
screenshot from 2018-02-01 20-40-44

Steps to Reproduce the Problem

  1. git clone https://github.com/zalando-incubator/hexo-theme-doc-seed.git docs
  2. cd docs
  3. npm install
  4. hexo s
  5. Go to http://localhost:4000, and try to search something in the search-bar placed in left menu.

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: Ubunntu 17.10
  • Hexo Version: 3.5.0

Enum values not present in UI Model Definitions

Expected Behavior

See Enum values in rendered page like:
selection_979

Can be found at: http://petstore.swagger.io/

Actual Behavior

Enum values not present in rendered page
selection_978

Steps to Reproduce the Problem

  1. Use the default petstore 2.0 spec. For pet gender it contains enum male or female.
  2. This does not show up in UI

Specifications

  • NodeJS Version: v8.9.0
  • NPM Version: 5.5.1
  • OS: DISTRIB_ID=LinuxMint DISTRIB_RELEASE=17.1
  • Hexo Version: 3.4.3
  • Hexo-theme-doc: 0.1.1

Hexo version output:

  • hexo: 3.4.3
  • hexo-cli: 1.0.4
  • os: Linux 3.13.0-37-generic linux x64
  • http_parser: 2.7.0
  • node: 8.9.0
  • v8: 6.1.534.46
  • uv: 1.15.0
  • zlib: 1.2.11
  • ares: 1.10.1-DEV
  • modules: 57
  • nghttp2: 1.25.0
  • openssl: 1.0.2l
  • icu: 59.1
  • unicode: 9.0
  • cldr: 31.0.1
  • tz: 2017b

Search button is not labeled

Expected Behavior

Using a screen reader, the search button should say "Search"

Actual Behavior

Read as Button

Steps to Reproduce the Problem

  1. Go to main site with screen reader, Read search area

Specifications

  • NodeJS Version:
  • NPM Version:
  • OS:
  • Hexo Version:

This can be fixed here:

<button className="dc-btn dc-search-form__btn doc-search-form__btn">

Two ways to fix.. Add text inside the button as "Search" and then move it off screen doing something like

   .screen-reader-text {
        position: absolute !important;
        display: block;
        visibility: visible;
        overflow: hidden;
        width: 1px;
        height: 1px;
        margin: -1px;
        border: 0;
        padding: 0;
        clip: rect(0px, 0px, 0px, 0px); /* deprecated */
        clip-path: polygon(0px 0px, 0px 0px, 0px 0px, 0px 0px);
    }

Or add an aria-label to the button with Search

Can I pre-populate search via the URL?

(Loving this theme, folks! Thank you.)

I have a use case where previously we were linking to "mydocs.com?q=search term" to drive users to search, and I'd like to duplicate that feature here. I've gotten so far as translating "myhexodocs.com#search=search term" to pluck out "search term" and enter it into the search box, but I'm having trouble using JS/jQuery to trigger the keyup and run the search.

Is there a better way of doing this, do you know? Is there some JS function that I can trigger to just say "search for X" or even to just run the search after I've pre-populated the search bar?

Support for Swagger 3.0

Hi,

Appreciate the wonderful work you have done thus far. Just inquiring about when to expect support for swagger 3.0

Thanks

Project Partials docs are incorrect.

Expected Behavior

documentation reflect functionality

Actual Behavior

'project_partials' is not being used. Object parameter name being used is 'partials'

https://zalando-incubator.github.io/hexo-theme-doc/usage-and-configuration/project-partials.html

documentation should read:

theme_config:
partials:
head_start:
- ./meta.ejs
- ./stylesheets.ejs
footer_end: ./scripts.ejs

NOT:
theme_config:
project_partials:
head_start:
- ./meta.ejs
- ./stylesheets.ejs
footer_end: ./scripts.ejs

How do I disable/hide searchbar on navigation bar?

There are only 5 pages in my documentation and I want to hide/disable search UI button and search bar on the navigation bar.
I've read the documentation and I could not find a way to do that, can someone help me with this?

Could add Chinese keyword index support ?

Expected Behavior

It works fine when I search some Chinese keyword.

Actual Behavior

When I search some Chinese keyword, it doesn't work. It works fine when I input English letters.

Steps to Reproduce the Problem

Specifications

  • NodeJS Version: 10.8.0
  • NPM Version: 6.2.0
  • OS: Linux
  • Hexo Version: 1.1.0

cdn is unreliable

some cdn is unreliable in china,
js resource choice Configuration can be provided ?
Or no cdn
thanks !

logo text doesn't show up

Expected Behavior

Show up {myText}(which is specified in "/{myFolder}/source/_data/navigation.yaml") right to the logo.

Actual Behavior

Right of the logo is a white blank.

Steps to Reproduce the Problem

  1. In the file: "/{myFolder}/source/_data/navigation.yaml", the first 4 lines:
logo:
- text: myText
  type: link
  path: index.html
main:
  1. hexo clean
  2. hexo s (or hexo deploy -g)
  3. The webpage didn't show {myText} right to the logo, and it is a blank.

How can I do? Thanks!

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: macOS High Sierra version 10.13.3
  • Hexo Version: 3.5.0

feat(swagger): permanent download link

Expected Behavior

Download link for a swagger specification should not change if the content of the specification has changed.

Actual Behavior

The link to download a swagger specification changes if the swagger specification has changed.
This prevent to share the link with others because there is a probability that it will change in the future.

Steps to Reproduce the Problem

  1. Include swagger_ui
  2. hexo genearte
  3. Check the download link
  4. change swagger specification content
  5. hexo generate
  6. check the download link, is changed

Specifications

  • NodeJS Version: v7.7.3
  • NPM Version: 5.6.0
  • OS: Mac OSX Yosemite
  • Hexo Version:
    hexo-cli: 1.0.3
    os: Darwin 14.5.0 darwin x64
    http_parser: 2.7.0
    node: 7.7.3
    v8: 5.5.372.41
    uv: 1.11.0
    zlib: 1.2.11
    ares: 1.10.1-DEV
    modules: 51
    openssl: 1.0.2k
    icu: 58.2
    unicode: 9.0
    cldr: 30.0.3
    tz: 2016j

`Maximum call stack size exceeded` when swagger.yaml spec contains circular $ref

Expected Behavior

swagger_ui and swagger_to_html should render a Swagger spec that contains circular $ref.

Actual Behavior

hexo generate or hexo server crash and show the following error:

INFO  Start processing
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: (unknown path)
  RangeError: Maximum call stack size exceeded
    at Object._prettifyError (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/nunjucks/src/lib.js:36:11)
    at /home/yo/tmp/experiment-hexo/ozd-docs/node_modules/nunjucks/src/environment.js:545:19
    at eval (eval at _compile (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/nunjucks/src/environment.js:615:18), <anonymous>:9:11)
    at tryCatcher (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/bluebird/js/release/promise.js:689:18)
    at Async._drainQueue (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/home/yo/tmp/experiment-hexo/ozd-docs/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

The issue is at the level of swagger-ui and is known (see UI crashes when the definitions contain circular references). It has been already fixed.

The question is: how to force hexo-theme-doc to use the fixed version of swagger-ui?

Steps to Reproduce the Problem

  1. have a swagger spec with circular $ref
  2. have a source file that uses swagger_ui tag or swagger_to_html tag
  3. execute hexo generate or hexo s

Specifications

  • NodeJS Version: 6.9.2
  • NPM Version: 3.10.9
  • OS: Ubuntu 14.04
  • Hexo Version: 3.7.1

I want to use this theme in normal way

I like this theme so I want to use it, but it is kind of difficult to use in normal way like- install hexo and just add the sources in theme directory and set up the _config.yml -

Of course, It is working in the quick start way but I want to understand more deeply and customize this theme.

I tried some way to use in normal way
Installing via git doesn't work with this url
(git clone [email protected]:zalando-incubator/hexo-theme-doc.git themes/doc)
but I was able to clone with your github url. and I failed use this theme as a 'theme'.

After with the quick start way, I added a theme in the themes folder and changed theme tested,
hopefully it worked - only after remove the swagger files.
is there any way to set the config using swagger or not ?

Can you please explain more about this theme's directories and structure ?

and I use Korean language but the search doesn't support it.
How can I make it through?

also I wonder
is there any command sentence instead of using (hexo new post "title" ) ?
and updating navigation file command?

and I tried the scss file update but faild,
so I tried to edit the css file directly but it doesn't updated... do you know why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.