zalando-incubator / hexo-theme-doc Goto Github PK
View Code? Open in Web Editor NEWA documentation theme for the Hexo blog framework
Home Page: https://zalando-incubator.github.io/hexo-theme-doc
License: Other
A documentation theme for the Hexo blog framework
Home Page: https://zalando-incubator.github.io/hexo-theme-doc
License: Other
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.
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.
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
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!
bug(swagger-to-html): curl example shouldn't use -x
I follow The doc Starter , but not successfully use git pages to build a site
Try to build a doc gitpages, but seems hard to me?
Hi, I found that I cannot search in Chinese or other language in this theme.
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??
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.
Release 0.1.0 version
Tested on IPhone Chrome and Safari
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 %}
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.)
The columns in the table are too close to one another.
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 |
Is it possible to adjust this? Thanks a lot.
Please breadcrumb feature to the documentation theme.
Best regards,
Sarin Na Wangkanai
http://localhost:4000/ brings up basic template of hexo-theme-doc
blank page with error message WARN No layout: index.html
default landscape theme works fine
theme: ../node_modules/hexo-theme-doc
hexo s
Navigation menu with site title in its header
Navigation menu doesn't have a site title. You can see the live version here: http://tabel.fractaltech.in/
Not sure. Maybe there is a config property that I have not set properly which you can point me to.
Adding custom SCSS is straightforward.
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.
Hi
I am using hexo-theme-doc with hexo-theme-doc-seed. I keep
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
Getting error in attached image. Cannot seem to resolve relative references such as
$ref: '#/parameters/Authorization
Markdown file contains only reference to spec file
{% swagger_ui ./spec/petstore.yaml %}
Also have the latest version of hexo-theme-docs which refers to npm version of hexo-doc rather than git repo
Hexo version output:
Document on the gh-pages branch/website:
Test running on travis are extremely slower.
more info : jestjs/jest#3855
Use version 3 of swagger-ui
see git branch
Today I tried to include swagger-ui version 3 with a naif/raw implementation meant to discover:
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:
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
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.
Sidebar item showing up.
Nothing. Just the title, i've tried the quick (seed) and long start (npm), same result.
Thanks for helping!
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!!
I hope that the navigator in the left won't refresh every time I clicked to a new link.
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.
Thanks a lot!
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.
Travis CI Job runs selenium tests.
Travis CI job fails claiming that Selenium server is not running.
The code block is properly(i.e., rectangular) displayed in the browser on a smartphone.
The corner of the code block is not displayed correctly in the browser on a smartphone. There are rectangular hollows in the corner.
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 and title when swagger_ui version set to 3
SHould be able to click link and download swagger specification
Blank link with no title. Cannot download specification
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.
Also have the latest version of hexo-theme-docs which refers to npm version of hexo-doc rather than git repo
Hexo version output:
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 objects should display array square bracket with definition object inside it. Like they have in editor.swagger.io example spec
You get the array square brackets with the object curly braces inside but the object definition is missing (fields and field names)
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
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
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)
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.
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)
git clone https://github.com/zalando-incubator/hexo-theme-doc-seed.git docs
cd docs
npm install
hexo s
http://localhost:4000
, and try to search something in the search-bar placed in left menu.See Enum values in rendered page like:
Can be found at: http://petstore.swagger.io/
Enum values not present in rendered page
Hexo version output:
Using a screen reader, the search button should say "Search"
Read as Button
This can be fixed here:
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
(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?
Hi,
Appreciate the wonderful work you have done thus far. Just inquiring about when to expect support for swagger 3.0
Thanks
documentation reflect functionality
'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
Navigation is full customized by users. Thats fine. but is it more convenient that auto-generate by categories?
The swagger object returned by SwaggerParser.validate(), when converted to YAML contains some &ref_
.
Check the behaviour.
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?
It works fine when I search some Chinese keyword.
When I search some Chinese keyword, it doesn't work. It works fine when I input English letters.
some cdn is unreliable in china,
js resource choice Configuration can be provided ?
Or no cdn
thanks !
Show up {myText}(which is specified in "/{myFolder}/source/_data/navigation.yaml") right to the logo.
Right of the logo is a white blank.
logo:
- text: myText
type: link
path: index.html
main:
How can I do? Thanks!
Download link for a swagger specification should not change if the content of the specification has changed.
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.
swagger_ui
and swagger_to_html
should render a Swagger spec that contains circular $ref.
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
?
swagger_ui
tag or swagger_to_html
taghexo generate
or hexo s
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?
Update to dress-code 2.3.0
Use dc-icon--link
for "anchor" feature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.