I just followed How to upload html documentation generated from sphinx to github? and everything works fine until I uploaded it to my github. I intend to make it as my personal website and I didn't make gh-pages branch. It looks something like this:
but it should look something like this, which I look from local:
Does anyone know what went wrong? I did include ".nojekyll" in the root. All the files generated directly from make html (however, I didn't upload files in "doctree"; only files in "html")
Thanks much!
The file name should be .nojekyll not .nojekyII :(
Related
I'm developing a Python Flask webapp and I'm trying to convert some user uploaded pdfs to nicely formatted HTML, like the HTML that is being produced when you display a pdf inside an iframe.
I tried several things so far:
the pdfminer.six library, produced messy HTML,
trying to grab the produced HTML, when rendering a PDF with pdf.js, which is apparently hidden in a Shadow DOM with no access to its inner HTML
finally I came across pdf2htmlEX (https://github.com/pdf2htmlEX/pdf2htmlEX) which produced exactly what I wanted.
Locally, this solution worked great, however in the production state (Heroku) I was unable to install it correctly. The project is deprecated and the documentation is limited and terrible. The problem has something to do with broken dependencies.
So, how to convert PDFs to HTML effectively without losing any format using Python or any other tool?
Thanks a lots.
if anyone is willing to help me getting the pdf2htmlEX to work on heroku, leave a comment and I will post more details in a different post
This is not going to be trivial. But I'll give some pointers.
You need an app.json in which you define your buildpacks.
https://devcenter.heroku.com/articles/app-json-schema#buildpacks
If this project is available via apt it's going to be easy. You just use the Heroku's Apt buildpack define an Aptfile that says which packages it needs to install. Example
Then it installs it automatically and you are done.
If it is not available as a package you will need to create your own buildpack.
https://devcenter.heroku.com/articles/buildpack-api
Example used here.
Another solution is to dockerize your project and execute it as a docker container.
I generated Python docs using Sphinx using make html. When I opened index.html in my browser the docs displayed as expected and all links worked as expected.
I then committed all docs and pushed to a branch in GitHub.
When I access the url https://<my company>.github.io/<my repo>/ the page displays but the CSS isn't working and some of the links do not work. Does anybody know why this might be?
The problem was that some files were missing. After reading this I added an empty .nojekyll which resolved the issue.
I'm trying to combine Sphinx on my Django development server. I know i could better use apache. But I can't use apache due to the fact that the project will be managed by someone else and the project needs to work as simple as possible. Without too many external libraries etc.
So i tried django-docs package and django.static.serve in my url. The HTML pages work, only the look of the pages is just plain html so the CSS isn't included. The documentation on django-docs is really bad and i can't seem to get it to work with the static files Sphinx created. I can't use sphinxdocs as well since it needs haystacks which will add to my external libraries.
I added django-docs to my installed apps and added this to my settings. With projectpath being the path to where my conf.py is located. I'm not sure if the location is right though. But the documentation isn't really clear at what i should fill in on the project path part. And i added the urls in my urlspatterns
DOCS_ROOT = os.path.join(PROJECT_PATH, '../docs/_build/html')
DOCS_ACCESS = 'staff'
url(r'^docs/', include('docs.urls')),
In sphinx doc the static files are located in the docs/_build/html/_static
I found the problem If anyone else has the issue. I had some other folders called static inside my docs folder. When i removed them it worked. So it was just me being a bit stupid.
All the files I upload to the tree.io tickets, projects, etc cannot be downloaded,
I am getting a 404 error.
I am running tree.io in a cantos 6 box.
any ideas to get this working please ?
after sometime found a solution for this.
i had to define the MEDIA_ROOT as an absolute URL in the settings.py
when i went to static/media there was no folder called attachments, i had to make one and give it the correct permissions for python can write to that folder.
this worked for me.
My webserver symbolic linked another server. But a uploaded file was 0 byte when I uploaded file. It was work well before (I used just web server directory)
I don't have any idea dealing with this problem. Does anybody have a trouble like this problem on NFS?
In addition, It works well if I use on Python console.
Thanks,
I found a problem. It was django problem with NFS.
If you have same trouble, check this URLs.
http://www.mail-archive.com/django-users#googlegroups.com/msg55892.html
https://code.djangoproject.com/ticket/9400