Comments (9)
It should be possible to build the site on Windows. The build
section of the makefile can be converted to a Windows Batch script. Something along these lines:
if exist ".\site\" (
rmdir /s /q ".\site\"
)
mkdir ".\site\"
xcopy /s /q ".\static\." ".\site"
sassc ".\scss\site.scss" -s compressed > ".\site\css\styles.min.css"
python ".\bin\generator.py"
from epsalt.ca.
Ok, I'm running the above in a batch file and all works except the last line and I get this error -
g:\www\epsalt>python ".\bin\generator.py"
Traceback (most recent call last):
File ".\bin\generator.py", line 12, in <module>
from dateutil.parser import parse
ModuleNotFoundError: No module named 'dateutil'
I ran the pip installer and got this -
c:\Python37>pip install python-dateutil
Requirement already satisfied: python-dateutil in c:\python37\lib\site-packages (2.8.0)
Requirement already satisfied: six>=1.5 in c:\python37\lib\site-packages (from python-dateutil) (1.1
2.0)
So pip says I got it but generator.py says no??
from epsalt.ca.
Could be a pip/python version problem? You may be installing the packages for Python 3 but Python 2 is getting called in the python ".\bin\generator.py"
line. Changing python
in that line to your full Python 3 executable location might work.
Alternatively you could try using a Python 3 virtualenv and installing dependencies with pip install -r requirements.txt
. That is what I am doing in my dev environment to build the site.
from epsalt.ca.
Ok, I added the full path for python 3 and get this error -
41 File(s) copied
Traceback (most recent call last):
File ".\bin\generator.py", line 256, in <module>
SiteGenerator(DIRS, SITE, MarkdownReader, JinjaRenderer).publish()
File ".\bin\generator.py", line 41, in __init__
self.read = reader().read
File ".\bin\generator.py", line 215, in __init__
self.md = Markdown(self.extensions, output_format='html5')
TypeError: __init__() takes 1 positional argument but 2 were given
from epsalt.ca.
To get it working I did this -
pip install "markdown<3.0.0"
from epsalt.ca.
Looks like there may have been a breaking change in the Markdown
package since the version of Markdown~=2.6.11
the code in generator.py relies on.
Can check that your package versions agree with the requirements.txt file in the repo?
EDIT: Just saw your response, nevermind!
from epsalt.ca.
Is there a way to have both markdown versions work? Are you going to have to update your code to make ver. 3 work?
FYI, I just uploaded your test site to surge.sh and everytime I click a link Firefox asks me if I want to open or save the file. I think it's because you have decided to not have html extensions on your links. I will try Netlify now and update this post.
Update - Ok, Netlify is different but just as bad. Every link I click shows me the raw html. I had this problem on another cms/blog recently also. It's all to do with the default mime type for files with no extension. Check it out here - http://objective-goldberg-7b5aaa.netlify.com/ and http://tpepsalt.surge.sh/
Is it easy to add "html" to all links in your code?? Maybe make it optional somewhere?
from epsalt.ca.
- I don't have any immediate plans to update to support the new version of the Markdown package
- Content-Type for extensionless files gets set to 'text/html' in the
deploy
section of the Makefile. I don't have any experience with Netlify or Surge so I can't help you there.
This is the code for my personal website and I am just dealing with my own use case currently. Feel free to work on your own fork though!
If you are looking for a static site generator with actual support I recommend trying one of the excellent options on https://www.staticgen.com/.
from epsalt.ca.
Ok, thanks.
from epsalt.ca.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epsalt.ca.